summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-08 02:36:18 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-03-08 02:36:18 (GMT)
commit31fd86c4f1ff17f615141c73f2ae61c61ea1b06c (patch)
treebefea1e53327983cb729dbf1890876a6bd3dbcf6 /Lib/BaseHTTPServer.py
parenta4f8313cbb5239a5f18abad93b4156246de2c13b (diff)
downloadcpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.zip
cpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.tar.gz
cpython-31fd86c4f1ff17f615141c73f2ae61c61ea1b06c.tar.bz2
add Content-Type header to error responses
this closes patch 502080
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r--Lib/BaseHTTPServer.py1
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,