]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
persistent connection / content-length fix. For non-200 replies, we
authorwessels <>
Mon, 1 Dec 1997 09:17:29 +0000 (09:17 +0000)
committerwessels <>
Mon, 1 Dec 1997 09:17:29 +0000 (09:17 +0000)
may or may not get a content-length.  If there is no content-length, AND
we've reached the end-of-headers, then we can still try being persistent.
This was previously #ifdef'd out as 'NOT_SURE_THIS_MATTERS'

src/http.cc

index f2e15722e379907aab53a2922d841d0301e835fd..09257d0ed796bbdf23471e1c62d0d16ef1b0053b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.224 1997/11/29 08:03:19 wessels Exp $
+ * $Id: http.cc,v 1.225 1997/12/01 02:17:29 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -573,15 +573,14 @@ httpPconnTransferDone(HttpStateData * httpState)
        return 0;
     debug(11, 5) ("httpPconnTransferDone: content_length=%d\n",
        reply->content_length);
-#if DONT_THINK_THIS_MATTERS
     /*
      * !200 replies maybe don't have content-length, so
      * if we saw the end of the headers then try being persistent.
      */
     if (reply->code != 200)
-       if (httpState->reply_hdr_state > 1)
-           return 1;
-#endif
+       if (reply->content_length < 0)
+           if (httpState->reply_hdr_state > 1)
+               return 1;
     /*
      * If there is no content-length, then we probably can't be persistent
      */