v1.0.135: fix HTTP header order — send_response before _send_cors

This commit is contained in:
2026-06-23 09:06:04 +04:00
parent 21914d1763
commit ec842abb92
+1 -1
View File
@@ -311,9 +311,9 @@ class Handler(BaseHTTPRequestHandler):
json={"filename": filename, "data": "\\x" + file_data.hex()}, json={"filename": filename, "data": "\\x" + file_data.hex()},
timeout=60 timeout=60
) )
self._send_cors()
if resp.status_code == 200: if resp.status_code == 200:
self.send_response(200) self.send_response(200)
self._send_cors()
self.send_header("Content-Type", "application/json; charset=utf-8") self.send_header("Content-Type", "application/json; charset=utf-8")
self.end_headers() self.end_headers()
self.wfile.write(resp.content) self.wfile.write(resp.content)