mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
merge 3.4 (#19996)
This commit is contained in:
commit
60a2f49c8c
4 changed files with 29 additions and 1 deletions
|
@ -190,6 +190,16 @@ class HeaderTests(TestCase):
|
|||
conn.request('GET', '/foo')
|
||||
self.assertTrue(sock.data.startswith(expected))
|
||||
|
||||
def test_malformed_headers_coped_with(self):
|
||||
# Issue 19996
|
||||
body = "HTTP/1.1 200 OK\r\nFirst: val\r\n: nval\r\nSecond: val\r\n\r\n"
|
||||
sock = FakeSocket(body)
|
||||
resp = client.HTTPResponse(sock)
|
||||
resp.begin()
|
||||
|
||||
self.assertEqual(resp.getheader('First'), 'val')
|
||||
self.assertEqual(resp.getheader('Second'), 'val')
|
||||
|
||||
|
||||
class BasicTest(TestCase):
|
||||
def test_status_lines(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue