diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-03-05 09:23:44 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-03-05 09:23:44 (GMT) |
commit | c37f835a431822a4756a272c248e3c8e3211443a (patch) | |
tree | 799db752752eccd55fcf1c3ffb98c0c66b520852 | |
parent | 2e8d9a799d9827faa4b9bcd981959422b63e629e (diff) | |
parent | 3fb066d286af3ec5b89b871628b01081deda9039 (diff) | |
download | cpython-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.
-rw-r--r-- | Lib/http/server.py | 2 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
2 files changed, 5 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() @@ -193,6 +193,10 @@ Core and Builtins Library ------- +- 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 submitted by Karl. + - Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when the list is being resized concurrently. |