Skip to content

Commit

Permalink
Issue #285: don't dispatch chunked transfer encoding request if messa…
Browse files Browse the repository at this point in the history
…ge body is not yet received completely
  • Loading branch information
spaceone committed Aug 20, 2021
1 parent 640c704 commit 45bd123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuits/web/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def _on_read(self, sock, data):
res.close = not parser.should_keep_alive()

clen = int(req.headers.get("Content-Length", "0"))
if clen and not parser.is_message_complete():
if (clen or req.headers.get("Transfer-Encoding") == "chunked") and not parser.is_message_complete():
return

if hasattr(sock, "getpeercert"):
Expand Down

0 comments on commit 45bd123

Please sign in to comment.