From e1329092445610f5918fe2dd29ed673b51abad19 Mon Sep 17 00:00:00 2001 From: Anthony Baire Date: Mon, 29 Jun 2015 20:05:01 +0200 Subject: [PATCH] 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 --- docker/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/client.py b/docker/client.py index 8bcc419e..8748a4f7 100644 --- a/docker/client.py +++ b/docker/client.py @@ -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