mirror of https://github.com/python/cpython
add Content-Type header to error responses
this closes patch 502080
This commit is contained in:
parent
a4f8313cbb
commit
31fd86c4f1
|
@ -287,6 +287,7 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
|
|||
explain = long
|
||||
self.log_error("code %d, message %s", code, message)
|
||||
self.send_response(code, message)
|
||||
self.send_header("Content-Type", "text/html")
|
||||
self.end_headers()
|
||||
self.wfile.write(self.error_message_format %
|
||||
{'code': code,
|
||||
|
|
Loading…
Reference in New Issue