Constant receive buffer size.

This commit is contained in:
L. Kärkkäinen 2020-03-26 16:41:54 +02:00
parent 01480c437b
commit e4a9b43bed

View File

@ -254,8 +254,8 @@ class HttpProtocol(asyncio.Protocol):
return self.close()
self.recv_buffer += data
# Buffer up to request max size
if len(self.recv_buffer) > self.request_max_size:
# Buffer up to 64 KiB (TODO: configurable?)
if len(self.recv_buffer) > 65536:
self.transport.pause_reading()
if self._data_received: