diff options
author | Skip Montanaro <skip@pobox.com> | 2002-03-08 02:36:18 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-03-08 02:36:18 (GMT) |
commit | 31fd86c4f1ff17f615141c73f2ae61c61ea1b06c (patch) | |
tree | befea1e53327983cb729dbf1890876a6bd3dbcf6 | |
parent | a4f8313cbb5239a5f18abad93b4156246de2c13b (diff) | |
download | cpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.zip cpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.tar.gz cpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.tar.bz2 |
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, |