From: wessels <> Date: Thu, 9 Apr 1998 08:25:20 +0000 (+0000) Subject: minor squid-internal URL cleanup, but no bug fixes X-Git-Tag: SQUID_3_0_PRE1~3539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb20ca39130d2fba591cdd57965b0f9eb6799a50;p=thirdparty%2Fsquid.git minor squid-internal URL cleanup, but no bug fixes --- diff --git a/src/client_side.cc b/src/client_side.cc index 90760ac9eb..0be146f62e 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.267 1998/04/09 00:17:56 wessels Exp $ + * $Id: client_side.cc,v 1.268 1998/04/09 02:25:20 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1341,6 +1341,8 @@ clientProcessRequest2(clientHttpRequest * http) StoreEntry *e; if ((e = http->entry = storeGet(key)) == NULL) { /* this object isn't in the cache */ + if (http->internal) + debug_trap("TCP_MISS for internal object"); return LOG_TCP_MISS; } else if (EBIT_TEST(e->flag, ENTRY_SPECIAL)) { /* ideally, special entries should be processed later, diff --git a/src/ipcache.cc b/src/ipcache.cc index 7ce9040786..054c6faa66 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.176 1998/04/03 06:27:05 wessels Exp $ + * $Id: ipcache.cc,v 1.177 1998/04/09 02:25:22 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -756,6 +756,8 @@ ipcacheStatPrint(ipcache_entry * i, StoreEntry * sentry) for (k = 0; k < (int) i->addrs.count; k++) storeAppendPrintf(sentry, " %15s-%3s", inet_ntoa(i->addrs.in_addrs[k]), i->addrs.bad_mask[k] ? "BAD" : "OK "); + if (i->addrs.count > 1 && k == i->addrs.cur) + storeAppendPrintf(sentry, ",CUR"), storeAppendPrintf(sentry, "\n"); } diff --git a/src/protos.h b/src/protos.h index 37f6cc9b4c..4959c20921 100644 --- a/src/protos.h +++ b/src/protos.h @@ -829,7 +829,7 @@ extern method_t urlParseMethod(const char *); extern void urlInitialize(void); extern request_t *urlParse(method_t, char *); extern char *urlCanonical(const request_t *, char *); -extern char *urlRInternal(const char *host, int port, const char *dir, const char *name); +extern char *urlRInternal(const char *host, u_short port, const char *dir, const char *name); extern char *urlInternal(const char *dir, const char *name); extern request_t *requestLink(request_t *); extern void requestUnlink(request_t *); diff --git a/src/url.cc b/src/url.cc index 6f8c136d85..ea61d859e2 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,6 +1,6 @@ /* - * $Id: url.cc,v 1.86 1998/04/06 05:43:27 rousskov Exp $ + * $Id: url.cc,v 1.87 1998/04/09 02:25:24 wessels Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -371,14 +371,17 @@ urlCanonicalClean(const request_t * request) /* makes internal url with a given host and port (remote internal url) */ char * -urlRInternal(const char *host, int port, const char *dir, const char *name) +urlRInternal(const char *host, u_short port, const char *dir, const char *name) { LOCAL_ARRAY(char, buf, MAX_URL); + static char lc_host[SQUIDHOSTNAMELEN]; assert(host && port && name); + xstrncpy(lc_host, host, SQUIDHOSTNAMELEN); + Tolower(lc_host); if (!dir || !*dir) - snprintf(buf, MAX_URL, "http://%s:%d/squid-internal/%s", host, port, name); + snprintf(buf, MAX_URL, "http://%s:%d/squid-internal/%s", lc_host, port, name); else - snprintf(buf, MAX_URL, "http://%s:%d/squid-internal/%s/%s", host, port, dir, name); + snprintf(buf, MAX_URL, "http://%s:%d/squid-internal/%s/%s", lc_host, port, dir, name); return buf; } @@ -386,10 +389,7 @@ urlRInternal(const char *host, int port, const char *dir, const char *name) char * urlInternal(const char *dir, const char *name) { - static char host[SQUIDHOSTNAMELEN]; - xstrncpy(host, getMyHostname(), SQUIDHOSTNAMELEN); - Tolower(host); - return urlRInternal(host, Config.Port.http->i, dir, name); + return urlRInternal(getMyHostname(), Config.Port.http->i, dir, name); } request_t *