Issue 1929: httplib _read_chunked TypeError ||| i = line.find(";") (original) (raw)

(With current python3-svn) While trying to response.read() got this:


File "/usr/lib/python3.0/httplib.py", line 533, in read return self._read_chunked(amt) File "/usr/lib/python3.0/httplib.py", line 573, in _read_chunked i = line.find(";") TypeError: expected an object with the buffer interface

To debug I did this:

line = self.fp.readline() +print(' ***', line) i = line.find(b";")

and got "*** b'2e6d\r\n'" followed by those TypeError exception. I did this:

def _read_chunked(self, amt):
    assert self.chunked != _UNKNOWN
    chunk_left = self.chunk_left

And it seems to work.