From: mike Date: Wed, 9 Jan 2013 22:17:45 +0000 (+0000) Subject: Fix over-reads causing 60-second delays when doing authenticated requests. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11362f0af86d64564bb5ee3a9f97e41c6971981b;p=thirdparty%2Fcups.git Fix over-reads causing 60-second delays when doing authenticated requests. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10787 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/cups/http.c b/cups/http.c index 74abf2e026..f3fa31122e 100644 --- a/cups/http.c +++ b/cups/http.c @@ -2395,6 +2395,14 @@ httpRead2(http_t *http, /* I - Connection to server */ if ((bytes = http_read_chunk(http, buffer, length)) > 0) http->data_remaining -= bytes; } + else if (http->data_remaining <= 0) + { + /* + * No more data to read... + */ + + return (0); + } else { DEBUG_printf(("1httpRead2: Reading up to %d bytes into buffer.",