/*
- * $Id: cache_cf.cc,v 1.317 1998/12/16 00:07:17 wessels Exp $
+ * $Id: cache_cf.cc,v 1.318 1999/01/19 20:26:33 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
uniqueHostname(),
(int) Config.Port.http->i,
full_appname_string);
+ /*
+ * the extra space is for loop detection in client_side.c -- we search
+ * for substrings in the Via header.
+ */
+ snprintf(ThisCache2, sizeof(ThisCache), " %s:%d (%s)",
+ uniqueHostname(),
+ (int) Config.Port.http->i,
+ full_appname_string);
if (!Config.udpMaxHitObjsz || Config.udpMaxHitObjsz > SQUID_UDP_SO_SNDBUF)
Config.udpMaxHitObjsz = SQUID_UDP_SO_SNDBUF;
if (Config.appendDomain)
/*
- * $Id: client_side.cc,v 1.432 1999/01/19 02:24:23 wessels Exp $
+ * $Id: client_side.cc,v 1.433 1999/01/19 20:26:35 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
request->flags.auth = 1;
if (httpHeaderHas(req_hdr, HDR_VIA)) {
String s = httpHeaderGetList(req_hdr, HDR_VIA);
- /* ThisCache cannot be a member of Via header, "1.0 ThisCache" can */
- if (strListIsSubstr(&s, ThisCache, ',')) {
+ /*
+ * ThisCache cannot be a member of Via header, "1.0 ThisCache" can.
+ * Note ThisCache2 has a space prepended to the hostname so we don't
+ * accidentally match super-domains.
+ */
+ if (strListIsSubstr(&s, ThisCache2, ',')) {
debugObj(33, 1, "WARNING: Forwarding loop detected for:\n",
request, (ObjPackMethod) & httpRequestPack);
request->flags.loopdetect = 1;
/*
- * $Id: globals.h,v 1.74 1998/12/09 23:01:00 wessels Exp $
+ * $Id: globals.h,v 1.75 1999/01/19 20:26:32 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern char tmp_error_buf[ERROR_BUF_SZ];
extern char *volatile debug_options; /* NULL */
extern char ThisCache[SQUIDHOSTNAMELEN << 1];
+extern char ThisCache2[SQUIDHOSTNAMELEN << 1];
extern char config_input_line[BUFSIZ];
extern const char *AclMatchedName; /* NULL */
extern const char *DefaultConfigFile; /* DEFAULT_CONFIG_FILE */