Skip to content

Commit

Permalink
Fix body recv when no content-length
Browse files Browse the repository at this point in the history
  • Loading branch information
us3r64 committed Jan 15, 2024
1 parent f3070a3 commit 429ef02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_wiznet5k/adafruit_wiznet5k_wsgiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _get_environ(self, client: socket.socket) -> Dict:
body = client.recv(int(env["CONTENT_LENGTH"]))
env["wsgi.input"] = io.StringIO(body)
else:
body = client.recv(1024)
body = client.recv(0)
env["wsgi.input"] = io.StringIO(body)
for name, value in headers.items():
key = "HTTP_" + name.replace("-", "_").upper()
Expand Down

0 comments on commit 429ef02

Please sign in to comment.