]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport montanaro's checkin of
authorMichael W. Hudson <mwh@python.net>
Fri, 8 Mar 2002 13:41:09 +0000 (13:41 +0000)
committerMichael W. Hudson <mwh@python.net>
Fri, 8 Mar 2002 13:41:09 +0000 (13:41 +0000)
    revision 1.18 of BaseHTTPServer.py

add Content-Type header to error responses
this closes patch 502080

Lib/BaseHTTPServer.py

index 4d6d058fe163ac046da3d6b7a41538c804bdfc15..cbc60e400da3811a9abecb7766509be332e6e459 100644 (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,