add Content-Type header to error responses

this closes patch 502080
This commit is contained in:
Skip Montanaro 2002-03-08 02:36:18 +00:00
parent a4f8313cbb
commit 31fd86c4f1
1 changed files with 1 additions and 0 deletions

View File

@ -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,