diff options
-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() |