mirror of
https://github.com/rspamd/rspamd.git
synced 2024-07-31 08:18:22 +02:00
[Test] Another try to fix goddamned dummy http server
This commit is contained in:
parent
97137eeb57
commit
0363f2deda
@ -70,8 +70,9 @@ class MyHandler(http.server.BaseHTTPRequestHandler):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user