From: serassio <> Date: Sat, 13 May 2006 01:06:10 +0000 (+0000) Subject: Bug #1532: Mime icons are not displayed when viewing ftp sites when X-Git-Tag: SQUID_3_0_PRE4~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3ef8c0d5b5143955a576a71cd13150b6aac77eb;p=thirdparty%2Fsquid.git Bug #1532: Mime icons are not displayed when viewing ftp sites when visible_hostname is a short hostname (without domain). Forward port of 2.5 changes. --- diff --git a/src/internal.cc b/src/internal.cc index 996391a157..fbc0ce62d8 100644 --- a/src/internal.cc +++ b/src/internal.cc @@ -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; }