- Fixed forwarding/peer loop detection code (Brian Degenhardt) -
now a peer is ignored if it turns out to be us, rather than
committing suicide
+ - Changed the internal URL code to obey appendDomain for internal
+ objects if it needs appending. This fixes weirdnesses where
+ a machine can think it is "foo.bar.com", and "foo" is requested.
+ (Brian Degenhardt)
Changes to Squid-2.4.DEVEL4 ():
/*
- * $Id: internal.cc,v 1.19 2000/11/13 12:25:12 adrian Exp $
+ * $Id: internal.cc,v 1.20 2000/11/15 13:01:54 adrian Exp $
*
* DEBUG: section 76 Internal Squid Object handling
* AUTHOR: Duane, Alex, Henrik
static char lc_host[SQUIDHOSTNAMELEN];
assert(host && port && name);
/* convert host name to lower case */
- xstrncpy(lc_host, host, sizeof(lc_host));
+ xstrncpy(lc_host, host, SQUIDHOSTNAMELEN - 1);
Tolower(lc_host);
+ /*
+ * append the domain in order to mirror the requests with appended
+ * domains
+ */
+ if (Config.appendDomain && !strchr(lc_host, '.'))
+ strncat(lc_host, Config.appendDomain, SQUIDHOSTNAMELEN -
+ strlen(lc_host) - 1);
/* build uri in mb */
memBufReset(&mb);
memBufPrintf(&mb, "http://%s", lc_host);