Why?
Anyway, my general opinion is that append_domain should be completely
ripped out, replaced by a proper DNS search algorithm returning a
browser redirect when a FQDN is found for the requested name.
Regards
Henrik
Miquel van Smoorenburg wrote:
>
> 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 Wed Dec 12 2001 - 16:53:22 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST