Fix chunked mode crash.

This commit is contained in:
L. Kärkkäinen 2020-03-08 12:23:22 +02:00
parent 4c34508695
commit cbfeb1c99c

View File

@ -163,7 +163,7 @@ class Http:
request.stream = self request.stream = self
if headers.get("transfer-encoding") == "chunked": if headers.get("transfer-encoding") == "chunked":
self.request_body = "chunked" self.request_body = "chunked"
self.request_bytes_left = 0 self.request_bytes_left = self.request_bytes = 0
pos -= 2 # One CRLF stays in buffer pos -= 2 # One CRLF stays in buffer
else: else:
self.request_bytes_left = self.request_bytes = int( self.request_bytes_left = self.request_bytes = int(