]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Oof, icpCheckTransferDone() fix. We were ending the transfer after
authorwessels <>
Mon, 1 Dec 1997 11:46:50 +0000 (11:46 +0000)
committerwessels <>
Mon, 1 Dec 1997 11:46:50 +0000 (11:46 +0000)
the reply headers for ALL replies, not just non-200 replies.

src/client_side.cc

index bdb65f1151d739ddb383e1f3abd3b67bf422341e..fa2a448a88604c08e2fd0ba4562d01672caaa587 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.162 1997/12/01 02:19:19 wessels Exp $
+ * $Id: client_side.cc,v 1.163 1997/12/01 04:46:50 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1776,12 +1776,20 @@ icpCheckTransferDone(clientHttpRequest * http)
     if ((mem = entry->mem_obj) == NULL)
        return 0;
     if (mem->reply->content_length < 0) {
+       /*
+        * for 200 replies, we MUST have a content length,
+        * or wait for EOF on the socket.
+        */
+       if (mem->reply->code == 200)
+               return 0;
        /*
         * reply->hdr_sz will be set by httpParseReplyHeaders()
         * if we find the end of the headers.  If we find the end,
         * and there is no content length, stick a fork in us. 
         */
-       if (mem->reply->hdr_sz > 0)
+       else if (mem->reply->hdr_sz == 0)
+           return 0;
+       else if (http->out.offset >= mem->reply->hdr_sz)
            return 1;
        else
            return 0;