]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix over-reads causing 60-second delays when doing authenticated requests.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 9 Jan 2013 22:17:45 +0000 (22:17 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 9 Jan 2013 22:17:45 +0000 (22:17 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10787 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http.c

index 74abf2e026fb6c849f5f166c3ad31d584c6222c6..f3fa31122e816082e87eadd22be5c9799946933c 100644 (file)
@@ -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.",