diff options
author | Michael W. Hudson <mwh@python.net> | 2002-03-08 13:41:09 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-03-08 13:41:09 (GMT) |
commit | fcfa313f58671cc01d1ab45f510ad8ddd38b5c18 (patch) | |
tree | 845e3c76259fabb3499ee57c937b6b4ff12535a6 | |
parent | 65a9547384671b1b46187135339adeaf6cc4cae1 (diff) | |
download | cpython-fcfa313f58671cc01d1ab45f510ad8ddd38b5c18.zip cpython-fcfa313f58671cc01d1ab45f510ad8ddd38b5c18.tar.gz cpython-fcfa313f58671cc01d1ab45f510ad8ddd38b5c18.tar.bz2 |
backport montanaro's checkin of
revision 1.18 of BaseHTTPServer.py
add Content-Type header to error responses
this closes patch 502080
-rw-r--r-- | Lib/BaseHTTPServer.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py index 4d6d058..cbc60e4 100644 --- a/Lib/BaseHTTPServer.py +++ b/Lib/BaseHTTPServer.py @@ -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, |