docker-py
docker-py copied to clipboard
Fix reading from socket extracted from HTTPResponse
HTTPResponse access the underlying socket via an io.BufferedReader object, that may still have "unread" bytes in its internal buffer when the socket is extracted from HTTPResponse.
Preserve those bytes in an attribute of the socket object at the time of the extraction so that they are not lost.
Signed-off-by: Sergei Trofimov [email protected]