From 514540b90b2ce09e8c00a1e8535c9f4df378a16f Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Sat, 27 May 2017 15:32:37 +0200 Subject: [PATCH] add debug for header values --- sanic/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sanic/server.py b/sanic/server.py index 36b2a7a2..5ce15a1b 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -164,6 +164,8 @@ class HttpProtocol(asyncio.Protocol): self.url = url def on_header(self, name, value): + print(f'header "{name}": "{value}"') + if name == b'Content-Length' and int(value) > self.request_max_size: exception = PayloadTooLarge('Payload Too Large') self.write_error(exception)