From d7528295a89a90cef3d109bddea6ad869267905e Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 31 Jan 2011 19:17:05 -0700 Subject: [PATCH] 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. --- src/HttpMsg.cc | 15 --------------- 1 file changed, 15 deletions(-) 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"); } -- 2.47.2