From: Amos Jeffries Date: Tue, 25 Jan 2011 08:55:40 +0000 (+1300) Subject: Author: Fabian Hugelshofer X-Git-Tag: take03^2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16943272a0327da1539e1fc294e145496cb88fe9;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 c2ed19009b..276ca59acf 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -326,21 +326,6 @@ HttpMsg::persistent() const */ return !httpHeaderHasConnDir(&header, "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 = header.getStr(HDR_USER_AGENT); - - if (agent && !header.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(&header, "keep-alive"); }