fix premature EOF detection in streams

The docker engine may send empty chunks of data in the stream
(especially since https://github.com/docker/docker/pull/13033)
They should not be taken for EOF

Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr>
This commit is contained in:
Anthony Baire 2015-06-29 20:05:01 +02:00
parent 64dcd5a191
commit e132909244
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ class Client(requests.Session):
break
_, length = struct.unpack('>BxxxL', header)
if not length:
break
continue
data = response.raw.read(length)
if not data:
break