From cbfeb1c99c1552500002fc0441c45cb3adc625eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Sun, 8 Mar 2020 12:23:22 +0200 Subject: [PATCH] Fix chunked mode crash. --- sanic/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/http.py b/sanic/http.py index d1b8f08b..7e616724 100644 --- a/sanic/http.py +++ b/sanic/http.py @@ -163,7 +163,7 @@ class Http: request.stream = self if headers.get("transfer-encoding") == "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 else: self.request_bytes_left = self.request_bytes = int(