summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-03-05 09:23:44 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-03-05 09:23:44 (GMT)
commitc37f835a431822a4756a272c248e3c8e3211443a (patch)
tree799db752752eccd55fcf1c3ffb98c0c66b520852 /Lib/http/server.py
parent2e8d9a799d9827faa4b9bcd981959422b63e629e (diff)
parent3fb066d286af3ec5b89b871628b01081deda9039 (diff)
downloadcpython-c37f835a431822a4756a272c248e3c8e3211443a.zip
cpython-c37f835a431822a4756a272c248e3c8e3211443a.tar.gz
cpython-c37f835a431822a4756a272c248e3c8e3211443a.tar.bz2
Fix Issue #12921: BaseHTTPServer's send_error should send the correct error
response message when send_error includes a message in addition to error status. Patch contributed by Karl.
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index c4ac703..18a51fe 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -425,7 +425,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
# using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201)
content = (self.error_message_format %
{'code': code, 'message': _quote_html(message), 'explain': explain})
- self.send_response(code, message)
+ self.send_response(code, shortmsg)
self.send_header("Content-Type", self.error_content_type)
self.send_header('Connection', 'close')
self.end_headers()