mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix problem that may happen after interrupted chunk-encoding request
more in bug report: https://github.com/benoitc/gunicorn/issues/2684 Fixes #2684
This commit is contained in:
parent
ff58e0c6da
commit
c30b0d9d59
@ -67,7 +67,10 @@ class ChunkedReader(object):
|
||||
# Remove \r\n after chunk
|
||||
rest = rest[size:]
|
||||
while len(rest) < 2:
|
||||
rest += unreader.read()
|
||||
new_data = unreader.read()
|
||||
if not new_data:
|
||||
break
|
||||
rest += new_data
|
||||
if rest[:2] != b'\r\n':
|
||||
raise ChunkMissingTerminator(rest[:2])
|
||||
(size, rest) = self.parse_chunk_size(unreader, data=rest[2:])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user