Make test_urllib be strict about str/bytes.

(One change to httplib.py, but not enough for test_httplib.)
This commit is contained in:
Guido van Rossum 2007-08-29 01:53:26 +00:00
parent 7436a06375
commit 70d0ddab53
2 changed files with 5 additions and 5 deletions

View file

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