Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 022c474

Browse files
committed
Make test_httplib pass.
1 parent 70d0dda commit 022c474

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_httplib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class HeaderCountingBuffer(list):
5353
def __init__(self):
5454
self.count = {}
5555
def append(self, item):
56-
kv = item.split(':')
56+
kv = item.split(b':')
5757
if len(kv) > 1:
5858
# item is a 'Key: Value' header string
5959
lcKey = kv[0].decode('ascii').lower()
@@ -138,8 +138,8 @@ def test_read_head(self):
138138
resp.close()
139139

140140
def test_send_file(self):
141-
expected = ('GET /foo HTTP/1.1\r\nHost: example.com\r\n'
142-
'Accept-Encoding: identity\r\nContent-Length:')
141+
expected = (b'GET /foo HTTP/1.1\r\nHost: example.com\r\n'
142+
b'Accept-Encoding: identity\r\nContent-Length:')
143143

144144
body = open(__file__, 'rb')
145145
conn = httplib.HTTPConnection('example.com')

0 commit comments

Comments
 (0)