diff options
author | Guido van Rossum <guido@python.org> | 2007-09-12 19:43:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-09-12 19:43:09 (GMT) |
commit | a00f1237069233ac116c40c88ead2f5684629459 (patch) | |
tree | 44d7954e8ef9d00624ccabfd0e82aa31a51b8f64 /Lib | |
parent | 138bcb569ea2a884acfa3c84bb64733ecea915e0 (diff) | |
download | cpython-a00f1237069233ac116c40c88ead2f5684629459.zip cpython-a00f1237069233ac116c40c88ead2f5684629459.tar.gz cpython-a00f1237069233ac116c40c88ead2f5684629459.tar.bz2 |
Fix for bug 1148: str/bytes issue in httplib's _safe_read().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/httplib.py | 2 | ||||
-rw-r--r-- | Lib/test/test_httplib.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 3a830182..05ddf12 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -624,7 +624,7 @@ class HTTPResponse: raise IncompleteRead(s) s.append(chunk) amt -= len(chunk) - return "".join(s) + return b"".join(s) def getheader(self, name, default=None): if self.msg is None: diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 632c2bc..9abeb61 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -133,7 +133,7 @@ class BasicTest(TestCase): NoEOFStringIO) resp = httplib.HTTPResponse(sock, method="HEAD") resp.begin() - if resp.read() != "": + if resp.read(): self.fail("Did not expect response from HEAD request") resp.close() |