summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httpservers.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-19 02:50:18 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-01-19 02:50:18 (GMT)
commit044242360d093ec56cd08860f25da7e024e118b9 (patch)
tree04ae26bff1390f1d10117cf7be508d0c10365645 /Lib/test/test_httpservers.py
parent42953535686f7a8ed4dc250d9c87187c20462c1f (diff)
downloadcpython-044242360d093ec56cd08860f25da7e024e118b9.zip
cpython-044242360d093ec56cd08860f25da7e024e118b9.tar.gz
cpython-044242360d093ec56cd08860f25da7e024e118b9.tar.bz2
fix handling of 100-continue status code (closes #18574)
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r--Lib/test/test_httpservers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 9dd2778..dfccb6b 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -563,7 +563,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')
@@ -631,7 +632,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.