From: Amos Jeffries Date: Tue, 1 Feb 2011 02:17:05 +0000 (-0700) Subject: Author: Fabian Hugelshofer X-Git-Tag: SQUID_3_1_11~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7528295a89a90cef3d109bddea6ad869267905e;p=thirdparty%2Fsquid.git Author: Fabian Hugelshofer 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. --- diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 053c92599b..0748d2a1b4 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -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"); }