This commit is contained in:
Raymond Hettinger 2014-06-24 13:52:19 -07:00
commit ea2b007b44
3 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -29,6 +29,7 @@ Yaniv Aknin
Jyrki Alakuijala
Steve Alexander
Fred Allen
Jeff Allen
Ray Allen
Billy G. Allie
Kevin Altis

View File

@ -612,6 +612,10 @@ Documentation
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.