]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- do not disable client-side pconns for Netscape User-Agent if it is a proxy
authorrousskov <>
Sat, 23 May 1998 04:29:59 +0000 (04:29 +0000)
committerrousskov <>
Sat, 23 May 1998 04:29:59 +0000 (04:29 +0000)
  connection (not a client connection)

src/HttpReply.cc

index 5308d0e14268477c00163d1b08ca9c1454fd1197..b68da2f345a582ba002caec6243ddf5b26197eec 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.20 1998/05/22 05:19:09 rousskov Exp $
+ * $Id: HttpReply.cc,v 1.21 1998/05/22 22:29:59 rousskov Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -419,9 +419,11 @@ httpMsgIsPersistent(float http_ver, const HttpHeader *hdr)
        /* for modern versions of HTTP: persistent if not "close"d */
        return !httpHeaderHasConnDir(hdr, "close");
     } else {
-       /* pconns in Netscape 3.x are allegedly broken, return false */
+       /* pconns in Netscape 3.x are allegedly broken, return false 
+        *  if it is a client connection */
        const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
-       if (agent && (!strncasecmp(agent, "Mozilla/3.", 10) || !strncasecmp(agent, "Netscape/3.", 11)))
+       if (agent && !httpHeaderHas(hdr, HDR_VIA) &&
+           (!strncasecmp(agent, "Mozilla/3.", 10) || !strncasecmp(agent, "Netscape/3.", 11)))
            return 0;
        /* for old versions of HTTP: persistent if has "keep-alive" */
        return httpHeaderHasConnDir(hdr, "keep-alive");