From 7f40c89adef6ae7a29629c8e695dda584c2ee564 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 24 Nov 2020 11:50:17 +0100 Subject: [PATCH] root: fix KeyError in ASGI --- passbook/root/asgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passbook/root/asgi.py b/passbook/root/asgi.py index ec5598b60..32751d15e 100644 --- a/passbook/root/asgi.py +++ b/passbook/root/asgi.py @@ -87,7 +87,7 @@ class ASGILogger: if b"Content-Length" in headers: 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) self.log(runtime) await send(message)