From: rousskov <> Date: Fri, 22 May 1998 11:02:38 +0000 (+0000) Subject: - check for user-agent = Mozilla/3.* (i.e., netscape-3.*) and disable pconns X-Git-Tag: SQUID_3_0_PRE1~3282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e42c0121b2194ebbf50199d53671c90d3b3da5c;p=thirdparty%2Fsquid.git - check for user-agent = Mozilla/3.* (i.e., netscape-3.*) and disable pconns for that message. --- diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 5f542b9c4c..10d521842f 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -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"); } }