add debug for header values

This commit is contained in:
Daniel Schwarz 2017-05-27 15:32:37 +02:00
parent 23cb39b557
commit 514540b90b

View File

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