summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-06-24 16:39:49 -0400
committerR David Murray <rdmurray@bitdance.com>2014-06-24 16:39:49 -0400
commit14199f939278d67804cf44ef0b9d32f998c62d58 (patch)
tree44059e9cb8e5c63929e65f0241b0ed77deb89af6
parenta02f81ff1757a257c7243ff53542d6f4f34668db (diff)
downloadcpython-git-14199f939278d67804cf44ef0b9d32f998c62d58.tar.gz
#20155: use fake HTTP method names so windows doesn't hang the tests.
Windows was seeing the 'GET' generated by these tests as invalid and forcibly closing the socket, causing the test to fail. Patch by Jeff Allen.
-rw-r--r--Lib/test/test_httpservers.py5
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS4
3 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 493fade985..15dec1c8d0 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -125,7 +125,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
def test_request_line_trimming(self):
self.con._http_vsn_str = 'HTTP/1.1\n'
- self.con.putrequest('GET', '/')
+ self.con.putrequest('XYZBOGUS', '/')
self.con.endheaders()
res = self.con.getresponse()
self.assertEqual(res.status, 501)
@@ -152,8 +152,9 @@ class BaseHTTPServerTestCase(BaseTestCase):
self.assertEqual(res.status, 501)
def test_version_none(self):
+ # Test that a valid method is rejected when not HTTP/1.x
self.con._http_vsn_str = ''
- self.con.putrequest('PUT', '/')
+ self.con.putrequest('CUSTOM', '/')
self.con.endheaders()
res = self.con.getresponse()
self.assertEqual(res.status, 400)
diff --git a/Misc/ACKS b/Misc/ACKS
index 908f47b590..fa6b1f6e4d 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -29,6 +29,7 @@ Yaniv Aknin
Jyrki Alakuijala
Steve Alexander
Fred Allen
+Jeff Allen
Ray Allen
Billy G. Allie
Kevin Altis
diff --git a/Misc/NEWS b/Misc/NEWS
index 52c1e0e0ae..8598c3fdde 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -133,6 +133,10 @@ IDLE
Tests
-----
+- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
+ so that packet filtering software (specifically Windows Base Filtering Engine)
+ does not interfere with the transaction semantics expected by the tests.
+
- Issue #19493: Refactored the ctypes test package to skip tests explicitly
rather than silently.