root: fix KeyError in ASGI
This commit is contained in:
parent
3c0f640b48
commit
7f40c89ade
|
@ -87,7 +87,7 @@ class ASGILogger:
|
||||||
if b"Content-Length" in headers:
|
if b"Content-Length" in headers:
|
||||||
self.content_length += int(headers.get(b"Content-Length", b"0"))
|
self.content_length += int(headers.get(b"Content-Length", b"0"))
|
||||||
|
|
||||||
if message["type"] == "http.response.body" and not message["more_body"]:
|
if message["type"] == "http.response.body" and not message.get("more_body", None):
|
||||||
runtime = int((time() - self.start) * 10 ** 6)
|
runtime = int((time() - self.start) * 10 ** 6)
|
||||||
self.log(runtime)
|
self.log(runtime)
|
||||||
await send(message)
|
await send(message)
|
||||||
|
|
Reference in New Issue