Fix ASGI access logs missing method with websockets (#424)

This commit is contained in:
Giovanni Barillari 2024-10-29 19:33:52 +01:00 committed by GitHub
parent f5f6e690d3
commit 261ceba3fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,7 +147,7 @@ def _build_access_logger(fmt):
'protocol': 'HTTP/' + scope['http_version'],
'path': scope['path'],
'qs': scope['query_string'],
'method': scope['method'],
'method': scope.get('method', '-'),
'scheme': scope['scheme'],
},
resp_code,