mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
Make test_urllib be strict about str/bytes.
(One change to httplib.py, but not enough for test_httplib.)
This commit is contained in:
parent
7436a06375
commit
70d0ddab53
2 changed files with 5 additions and 5 deletions
|
@ -373,7 +373,7 @@ class HTTPResponse:
|
|||
# Assume it's a Simple-Response from an 0.9 server.
|
||||
# We have to convert the first line back to raw bytes
|
||||
# because self.fp.readline() needs to return bytes.
|
||||
self.fp = LineAndFileWrapper(bytes(line), self.fp)
|
||||
self.fp = LineAndFileWrapper(bytes(line, "ascii"), self.fp)
|
||||
return "HTTP/0.9", 200, ""
|
||||
|
||||
# The status code is a three-digit number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue