]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- check for user-agent = Mozilla/3.* (i.e., netscape-3.*) and disable pconns
authorrousskov <>
Fri, 22 May 1998 11:02:38 +0000 (11:02 +0000)
committerrousskov <>
Fri, 22 May 1998 11:02:38 +0000 (11:02 +0000)
  for that message.

src/HttpReply.cc

index 5f542b9c4c892391443ff2bbf0eeaf54cdffc28a..10d521842f787a2d9e7dcede6413edeb49382521 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.18 1998/05/11 18:44:27 rousskov Exp $
+ * $Id: HttpReply.cc,v 1.19 1998/05/22 05:02:38 rousskov Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -416,10 +416,14 @@ int
 httpMsgIsPersistent(float http_ver, const HttpHeader *hdr)
 {
     if (http_ver >= 1.1) {
-       /* for modern versions: persistent if not "close"d */
+       /* for modern versions of HTTP: persistent if not "close"d */
        return !httpHeaderHasConnDir(hdr, "close");
     } else {
-       /* for old versions: persistent if has "keep-alive" */
+       /* pconns in Netscape 3.x are allegedly broken, return false */
+       const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
+       if (agent && !strncasecmp(agent, "Mozilla/3.", 10))
+           return 0;
+       /* for old versions of HTTP: persistent if has "keep-alive" */
        return httpHeaderHasConnDir(hdr, "keep-alive");
     }
 }