magic-proxy: Send headers on error

sil2100/backport-datasource-raspi3
Robert C Jennings 6 years ago
parent aa06de9ae1
commit 0cf23f796f
No known key found for this signature in database
GPG Key ID: 740C3D9EEDF2ED73

@ -843,6 +843,7 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
"""Return an HTTP error status and a message in the response body.""" """Return an HTTP error status and a message in the response body."""
self.send_response(status) self.send_response(status)
self.send_header("Content-Type", "text/plain; charset=utf-8") self.send_header("Content-Type", "text/plain; charset=utf-8")
self.end_headers()
self.wfile.write(message.encode("utf-8")) self.wfile.write(message.encode("utf-8"))

Loading…
Cancel
Save