/*
- * $Id: cache_cf.cc,v 1.151 1996/12/03 20:26:48 wessels Exp $
+ * $Id: cache_cf.cc,v 1.152 1996/12/04 17:51:40 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
}
if (httpd_accel_mode && !strcmp(Config.Accel.host, "virtual"))
vhost_mode = 1;
+ sprintf(ThisCache, "%s:%d (Squid/%s)",
+ getMyHostname(),
+ (int) Config.Port.http,
+ SQUID_VERSION);
}
/*
- * $Id: http.cc,v 1.126 1996/12/03 23:30:48 wessels Exp $
+ * $Id: http.cc,v 1.127 1996/12/04 17:51:41 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
}
hdr_len = t - hdr_in;
/* Append Via: */
- sprintf(ybuf, "%3.1f %s:%d (Squid/%s)",
- orig_request->http_ver,
- getMyHostname(),
- (int) Config.Port.http,
- SQUID_VERSION);
+ sprintf(ybuf, "%3.1f %s" orig_request->http_ver, ThisCache);
strcat(viabuf, ybuf);
httpAppendRequestHeader(hdr_out, viabuf, &len, out_sz);
/* Append to X-Forwarded-For: */
- if (cfd >= 0)
- strcat(fwdbuf, fd_table[cfd].ipaddr);
+ strcat(fwdbuf, cfd < 0 ? "unknown" : fd_table[cfd].ipaddr);
httpAppendRequestHeader(hdr_out, fwdbuf, &len, out_sz);
if (!EBIT_TEST(hdr_flags, HDR_HOST)) {
sprintf(ybuf, "Host: %s", orig_request->host);
/*
- * $Id: main.cc,v 1.123 1996/12/03 20:26:57 wessels Exp $
+ * $Id: main.cc,v 1.124 1996/12/04 17:51:43 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
struct in_addr theOutICPAddr;
const char *const dash_str = "-";
const char *const null_string = "";
+char ThisCache[SQUIDHOSTNAMELEN<<1];
/* for error reporting from xmalloc and friends */
extern void (*failure_notify) _PARAMS((const char *));