/*
- * $Id: HttpMsg.cc,v 1.13 2003/09/01 03:49:37 robertc Exp $
+ * $Id: HttpMsg.cc,v 1.14 2005/03/06 21:08:13 serassio Exp $
*
* DEBUG: section 74 HTTP Message
* AUTHOR: Alex Rousskov
int
httpMsgIsPersistent(HttpVersion const &http_ver, const HttpHeader * hdr)
{
+#if WHEN_SQUID_IS_NOT_HTTP1_1
+
if ((http_ver.major >= 1) && (http_ver.minor >= 1)) {
/*
* for modern versions of HTTP: persistent unless there is
*/
return !httpHeaderHasConnDir(hdr, "close");
} else {
+#else
+ {
+#endif
/*
* Persistent connections in Netscape 3.x are allegedly broken,
* return false if it is a browser connection. If there is a
*/
const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
- if (agent && !httpHeaderHas(hdr, HDR_VIA)) {
+ if (agent && !httpHeaderHas(hdr, HDR_VIA))
+ {
if (!strncasecmp(agent, "Mozilla/3.", 10))
return 0;