Issue 1312980: httplib error handling and HTTP/0.9 fix (original) (raw)
HTTPResponse.begin did not initialize self.length if the protocol version is 0.9, which later causes an AttributeError. Also, error handling for "chunk_left = int(line, 16)" in HTTPResponse._read_chunked is missing, which might cause a ValueError. The patch fixes the above two problems.