Skip to content

Commit 6bb8f79

Browse files
authored
fix query string encoding in asgi app
Signed-off-by: hack <hacksparr0w@protonmail.com>
1 parent f48aea4 commit 6bb8f79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus_client/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def make_asgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: b
1111
async def prometheus_app(scope, receive, send):
1212
assert scope.get("type") == "http"
1313
# Prepare parameters
14-
params = parse_qs(scope.get('query_string', b''))
14+
params = parse_qs(scope.get('query_string', b'').decode("utf8"))
1515
accept_header = ",".join([
1616
value.decode("utf8") for (name, value) in scope.get('headers')
1717
if name.decode("utf8").lower() == 'accept'

0 commit comments

Comments
 (0)