]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1532: Mime icons are not displayed when viewing ftp sites when
authorserassio <>
Sat, 13 May 2006 01:06:10 +0000 (01:06 +0000)
committerserassio <>
Sat, 13 May 2006 01:06:10 +0000 (01:06 +0000)
visible_hostname is a short hostname (without domain).

Forward port of 2.5 changes.

src/internal.cc

index 996391a15702e9138ad2bf4c4b256aca685e1a8e..fbc0ce62d88e72aa702b56944ec52ce9086b8339 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: internal.cc,v 1.40 2006/05/08 23:38:33 robertc Exp $
+ * $Id: internal.cc,v 1.41 2006/05/12 19:06:10 serassio Exp $
  *
  * DEBUG: section 76    Internal Squid Object handling
  * AUTHOR: Duane, Alex, Henrik
@@ -151,7 +151,13 @@ internalHostname(void)
 {
     LOCAL_ARRAY(char, host, SQUIDHOSTNAMELEN + 1);
     xstrncpy(host, getMyHostname(), SQUIDHOSTNAMELEN);
+
+    if (Config.appendDomain && !strchr(host, '.'))
+        strncat(host, Config.appendDomain, SQUIDHOSTNAMELEN -
+                strlen(host) - 1);
+
     Tolower(host);
+
     return host;
 }