Author: georg.brandl Date: Sat Jan 26 10:45:58 2008 New Revision: 60315 Modified: python/branches/py3k/Lib/httplib.py Log: #1929: fix httplib _read_chunked (str/bytes confusion).
Modified: python/branches/py3k/Lib/httplib.py ============================================================================== --- python/branches/py3k/Lib/httplib.py (original) +++ python/branches/py3k/Lib/httplib.py Sat Jan 26 10:45:58 2008 @@ -560,14 +560,14 @@ 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) _______________________________________________ Python-3000-checkins mailing list Python-3000-checkins@python.org http://mail.python.org/mailman/listinfo/python-3000-checkins