Skip to content

Commit

Permalink
[Test] Another try to fix goddamned dummy http server
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Nov 19, 2022
1 parent 97137ee commit 0363f2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/util/dummy_http.py
Expand Up @@ -70,8 +70,9 @@ def do_GET(self):
def do_POST(self):
"""Respond to a POST request."""
response = b"hello post"
content_length = int(self.headers['Content-Length'])
body = self.rfile.read(content_length)
content_length = int(self.headers.get('Content-Length', "0")) or 0
if content_length > 0:
_ = self.rfile.read(content_length)
if self.path == "/empty":
self.finish()
return
Expand Down

0 comments on commit 0363f2d

Please sign in to comment.