

def _readall_chunked(self):
    assert (self.chunked != _UNKNOWN)
    chunk_left = self.chunk_left
    value = []
    while True:
        if (chunk_left is None):
            try:
                chunk_left = self._read_next_chunk_size()
                if (chunk_left == 0):
                    break
            except ValueError:
                raise IncompleteRead(bytes(b'').join(value))
        value.append(self._safe_read(chunk_left))
        self._safe_read(2)
        chunk_left = None
    self._read_and_discard_trailer()
    self._close_conn()
    return bytes(b'').join(value)

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/http/client.py HTTPResponse._readall_chunked/original