Fix chunked mode crash.
This commit is contained in:
parent
4c34508695
commit
cbfeb1c99c
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user