# HG changeset patch # User Jeff Allen # Date 1393187506 0 # Sun Feb 23 20:31:46 2014 +0000 # Branch 2.7 # Node ID 97ceaa2b18c720678391cd02da75797dcaf287b2 # Parent b514339e41ef591ead3335eb32cf13b6fddd990e Addresses issue #20155 test failures in test_httpservers on Windows. Use HTTP method names that do not have a special meaning to packet filtering software (on Windows, the Base Filtering Engine). Also Jython issue 2109. diff -r b514339e41ef -r 97ceaa2b18c7 Lib/test/test_httpservers.py --- a/Lib/test/test_httpservers.py Sat Feb 22 01:32:50 2014 -0500 +++ b/Lib/test/test_httpservers.py Sun Feb 23 20:31:46 2014 +0000 @@ -189,7 +189,7 @@ 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) @@ -216,8 +216,9 @@ 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 -r b514339e41ef -r 97ceaa2b18c7 Misc/NEWS --- a/Misc/NEWS Sat Feb 22 01:32:50 2014 -0500 +++ b/Misc/NEWS Sun Feb 23 20:31:46 2014 +0000 @@ -249,6 +249,10 @@ Tests ----- +- Issue #20155: Changed HTTP method names in failing tests in test_httpservers + so they do not have a special meaning to packet filtering software (on + Windows, the Base Filtering Engine). + - Issue #20510: Rewrote test_exit in test_sys to match existing comments, use modern unittest features, and use helpers from test.script_helper instead of using subprocess directly. Initial patch by Gareth Rees.