summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-26 09:45:58 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-26 09:45:58 (GMT)
commit95ba46962636c1925341120da30f124b1c4ef670 (patch)
tree4b1fcc5799434946675f7ddcac5f246663e8b5ab
parenta1e7e139666eb5325ca142a30ed03bee2c7d55b0 (diff)
downloadcpython-95ba46962636c1925341120da30f124b1c4ef670.zip
cpython-95ba46962636c1925341120da30f124b1c4ef670.tar.gz
cpython-95ba46962636c1925341120da30f124b1c4ef670.tar.bz2
#1929: fix httplib _read_chunked (str/bytes confusion).
-rw-r--r--Lib/httplib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 2b38e76..9321522 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -560,14 +560,14 @@ class HTTPResponse:
def _read_chunked(self, amt):
assert self.chunked != _UNKNOWN
chunk_left = self.chunk_left
- value = ""
+ value = b""
# XXX This accumulates chunks by repeated string concatenation,
# which is not efficient as the number or size of chunks gets big.
while True:
if chunk_left is None:
line = self.fp.readline()
- i = line.find(";")
+ i = line.find(b";")
if i >= 0:
line = line[:i] # strip chunk-extensions
chunk_left = int(line, 16)