File tree 1 file changed +5
-5
lines changed
ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ def collect_request_attributes(scope):
83
83
server_host = server [0 ] + (":" + str (port ) if port != 80 else "" )
84
84
full_path = scope .get ("root_path" , "" ) + scope .get ("path" , "" )
85
85
http_url = scope .get ("scheme" , "http" ) + "://" + server_host + full_path
86
- if scope .get ("query_string" ) and http_url :
87
- if isinstance ( scope [ " query_string" ], bytes ) :
88
- http_url = http_url + ( "?" + scope . get ( " query_string" ). decode ( "utf8" ))
89
- else :
90
- http_url = http_url + ("?" + urllib .parse .unquote (scope . get ( " query_string" ) ))
86
+ query_string = scope .get ("query_string" )
87
+ if query_string and http_url :
88
+ if isinstance ( query_string , bytes ):
89
+ query_string = query_string . decode ( "utf8" )
90
+ http_url = http_url + ("?" + urllib .parse .unquote (query_string ))
91
91
92
92
result = {
93
93
"component" : scope ["type" ],
You can’t perform that action at this time.
0 commit comments