]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Fabian Hugelshofer <fh@open.ch>
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 1 Feb 2011 02:17:05 +0000 (19:17 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 1 Feb 2011 02:17:05 +0000 (19:17 -0700)
Allow persistent connections for Mozilla/3.0 User-Agents

This fixes NTLM and Negotiate authentication for these agents.

History:

In 1998 a hack was added to HttpMsg::persistent() that disables
persistent connections for HTTP/1.0 User-Agents starting with
"Mozilla/3." and "Netscape/3.".

According to the thread on squid-dev
(http://www.eu.squid-cache.org/mail-archive/squid-dev/199805/0087.html),
this was necessary to make some versions of Netscape browsers work that
had a broken implementation of persistent connections. It was said that
"NS 3.01 is ok. NS 3.02 is bad. NS 3.04 is good." Netscape 4 was ok, too.

src/HttpMsg.cc

index 053c92599bd87ed6d84163f0013878a0ca19f294..0748d2a1b42050ef5ab54fa2a1db991cf0626971 100644 (file)
@@ -328,21 +328,6 @@ httpMsgIsPersistent(HttpVersion const &http_ver, const HttpHeader * hdr)
          */
         return !httpHeaderHasConnDir(hdr, "close");
     } else {
-        /*
-         * Persistent connections in Netscape 3.x are allegedly broken,
-         * return false if it is a browser connection.  If there is a
-         * VIA header, then we assume this is NOT a browser connection.
-         */
-        const char *agent = hdr->getStr(HDR_USER_AGENT);
-
-        if (agent && !hdr->has(HDR_VIA)) {
-            if (!strncasecmp(agent, "Mozilla/3.", 10))
-                return 0;
-
-            if (!strncasecmp(agent, "Netscape/3.", 11))
-                return 0;
-        }
-
         /* for old versions of HTTP: persistent if has "keep-alive" */
         return httpHeaderHasConnDir(hdr, "keep-alive");
     }