This patch is part of the patchset I'm using in the Debian squid-2.4.3
package. Though the patches here are against 2.4.3, they should apply
to 2.5 with minor difficulty.
no_append_domain_localhost.patch
Don't apply "append_domain" setting to "localhost"
in unqualified URLs.
Ignore append_domain setting for the string "localhost".
diff -ruN squid-2.4.1.orig/src/url.c squid-2.4.1/src/url.c
--- squid-2.4.1.orig/src/url.c Fri Jan 12 01:51:54 2001
+++ squid-2.4.1/src/url.c Thu Mar 22 21:06:07 2001
@@ -308,7 +308,7 @@
/* remove duplicate dots */
while ((t = strstr(host, "..")))
xmemmove(t, t + 1, strlen(t));
- if (Config.appendDomain && !strchr(host, '.'))
+ if (Config.appendDomain && !strchr(host, '.') && strcasecmp(host, "localhost") != 0)
strncat(host, Config.appendDomain, SQUIDHOSTNAMELEN);
if (port == 0) {
debug(23, 3) ("urlParse: Invalid port == 0\n");
Received on Mon Dec 10 2001 - 19:04:04 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST