docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Fix reading from socket extracted from HTTPResponse

Open setrofim opened this issue 6 years ago • 0 comments

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]

setrofim avatar Nov 21 '19 10:11 setrofim