From: Daniel Stenberg Date: Tue, 5 Jun 2007 13:42:23 +0000 (+0000) Subject: if we read zero bytes from the proxy, the connection is broken and we need X-Git-Tag: curl-7_16_3~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48064f8deefd5424591a1caeb4ddf6ae9754679a;p=thirdparty%2Fcurl.git if we read zero bytes from the proxy, the connection is broken and we need to bail out --- diff --git a/lib/socks.c b/lib/socks.c index 6b95e752d6..e1ad86cc0d 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -98,6 +98,11 @@ static int blockread_all(struct connectdata *conn, /* connection data */ result = CURLE_OK; break; } + if(!nread) { + result = ~CURLE_OK; + break; + } + buffersize -= nread; buf += nread; allread += nread;