Skip to content

Commit 62470b8

Browse files
committed
add test
1 parent e446056 commit 62470b8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_httplib.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ def test_ipv6host_header(self):
281281
conn.request('GET', '/foo')
282282
self.assertTrue(sock.data.startswith(expected))
283283

284+
expected = b'GET /foo HTTP/1.1\r\nHost: [fe80::]\r\n' \
285+
b'Accept-Encoding: identity\r\n\r\n'
286+
conn = client.HTTPConnection('[fe80::%2]')
287+
sock = FakeSocket('')
288+
conn.sock = sock
289+
conn.request('GET', '/foo')
290+
self.assertTrue(sock.data.startswith(expected))
291+
284292
def test_malformed_headers_coped_with(self):
285293
# Issue 19996
286294
body = "HTTP/1.1 200 OK\r\nFirst: val\r\n: nval\r\nSecond: val\r\n\r\n"

0 commit comments

Comments
 (0)