root: fix KeyError in ASGI

This commit is contained in:
Jens Langhammer 2020-11-24 11:50:17 +01:00
parent 3c0f640b48
commit 7f40c89ade
1 changed files with 1 additions and 1 deletions

View File

@ -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)