diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-01-19 02:51:11 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-01-19 02:51:11 (GMT) |
commit | c28ab08887ae1de3a759d77a227f4a2c8d9c918f (patch) | |
tree | c38b1d6ede22de9570abb92ce404bf209f9ebb97 | |
parent | 49776ef9e75065daf21c194c212cde73b378ff30 (diff) | |
parent | 3836593a2d9d8958325f3c312abb9207d47f87e6 (diff) | |
download | cpython-c28ab08887ae1de3a759d77a227f4a2c8d9c918f.zip cpython-c28ab08887ae1de3a759d77a227f4a2c8d9c918f.tar.gz cpython-c28ab08887ae1de3a759d77a227f4a2c8d9c918f.tar.bz2 |
merge 3.3 (#18574)
-rw-r--r-- | Lib/http/server.py | 2 | ||||
-rw-r--r-- | Lib/test/test_httpservers.py | 6 | ||||
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
4 files changed, 9 insertions, 3 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index 7b577b4..f170747 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -355,7 +355,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler): """ self.send_response_only(100) - self.flush_headers() + self.end_headers() return True def handle_one_request(self): diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index b2bce1c..e758cb9 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -584,7 +584,8 @@ class BaseHTTPRequestHandlerTestCase(unittest.TestCase): def test_with_continue_1_1(self): result = self.send_typical_request(b'GET / HTTP/1.1\r\nExpect: 100-continue\r\n\r\n') self.assertEqual(result[0], b'HTTP/1.1 100 Continue\r\n') - self.assertEqual(result[1], b'HTTP/1.1 200 OK\r\n') + self.assertEqual(result[1], b'\r\n') + self.assertEqual(result[2], b'HTTP/1.1 200 OK\r\n') self.verify_expected_headers(result[2:-1]) self.verify_get_called() self.assertEqual(result[-1], b'<html><body>Data</body></html>\r\n') @@ -652,7 +653,8 @@ class BaseHTTPRequestHandlerTestCase(unittest.TestCase): self.assertNotEqual(_readAndReseek(output), b'') result = _readAndReseek(output).split(b'\r\n') self.assertEqual(result[0], b'HTTP/1.1 100 Continue') - self.assertEqual(result[1], b'HTTP/1.1 200 OK') + self.assertEqual(result[1], b'') + self.assertEqual(result[2], b'HTTP/1.1 200 OK') def test_with_continue_rejected(self): usual_handler = self.handler # Save to avoid breaking any subsequent tests. @@ -1052,6 +1052,7 @@ Jeff Ramnani Brodie Rao Senko Rasic Antti Rasinen +Nikolaus Rath Sridhar Ratnakumar Ysj Ray Eric S. Raymond @@ -25,6 +25,9 @@ Core and Builtins Library ------- +- Issue #18574: Fixed handling of 100-continue reply from server in + http.client.HTTPConnection. Patch by Nikolaus Rath. + - Issue #20270: urllib.urlparse now supports empty ports. - Issue #20243: TarFile no longer raise ReadError when opened in write mode. |