Correct CRLF after HTTP headers in OPTIONS request (#1570)

Close #1569
This commit is contained in:
Сергей Бурладян
2020-06-02 08:55:49 +02:00
committed by GitHub
parent cd1b2741fa
commit 6e4ca1717c
+1 -1
View File
@@ -118,7 +118,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
if write_status_code_only: # when haproxy sends OPTIONS request it reads only status code and nothing more
message = self.responses[status_code][0]
self.wfile.write('{0} {1} {2}\r\n'.format(self.protocol_version, status_code, message).encode('utf-8'))
self.wfile.write('{0} {1} {2}\r\n\r\n'.format(self.protocol_version, status_code, message).encode('utf-8'))
else:
self._write_status_response(status_code, response)