]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
minor squid-internal URL cleanup, but no bug fixes
authorwessels <>
Thu, 9 Apr 1998 08:25:20 +0000 (08:25 +0000)
committerwessels <>
Thu, 9 Apr 1998 08:25:20 +0000 (08:25 +0000)
src/client_side.cc
src/ipcache.cc
src/protos.h
src/url.cc

index 90760ac9eb0908ea5a83961fa796ec75795d2a6e..0be146f62e59c3e27de23a92c8c1da5b3dbc7d6b 100644 (file)
@@ -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, 
index 7ce90407864e81900eff5741b2d34659af89c34a..054c6faa6611cdca1af88c64684cdee21138620e 100644 (file)
@@ -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");
 }
 
index 37f6cc9b4c24c782b1475f96d50990e1e7a73b26..4959c209211bc324b9ed3a5114c5d5a7033689e3 100644 (file)
@@ -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 *);
index 6f8c136d85b6c28318f192200a2ffe1dee8a0d6d..ea61d859e23fbe404c74c0a2528dd6972e22423b 100644 (file)
@@ -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 *