Manually reset the buffer when streaming request body (#2183)

This commit is contained in:
Adam Hopkins 2021-07-06 08:24:20 +03:00 committed by GitHub
parent 8b7ea27a48
commit a90877ac31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -490,6 +490,9 @@ class Http:
if size <= 0:
self.request_body = None
# Because we are leaving one CRLF in the buffer, we manually
# reset the buffer here
self.recv_buffer = bytearray()
if size < 0:
self.keep_alive = False