]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
2.0 branch merge
authorwessels <>
Fri, 9 Oct 1998 23:52:54 +0000 (23:52 +0000)
committerwessels <>
Fri, 9 Oct 1998 23:52:54 +0000 (23:52 +0000)
src/cf.data.pre
src/client_side.cc
src/http.cc
src/store.cc

index 043e3924cd7fec0f097788c8e8a51253eb1a6535..4a6da3144356cdf47787b6ca5e17a620d70ca08b 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.117 1998/10/08 20:10:15 wessels Exp $
+# $Id: cf.data.pre,v 1.118 1998/10/09 17:52:54 wessels Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -1016,7 +1016,10 @@ TYPE: refreshpattern
 LOC: Config.Refresh
 DEFAULT: none
 DOC_START
-       usage: refresh_pattern regex min percent max [options]
+       usage: refresh_pattern [-i] regex min percent max [options]
+
+       By default, regular expressions are CASE-SENSITIVE.  To make
+       them case-insensitive, use the -i option.
 
        min and max are specified in MINUTES.
        percent is an integer number.
index d65a08a3a4a27ba6bec8309b95fed0aed16063d4..cdb2d87da174f5319bc8f9c8c31a26080027f057 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.408 1998/10/08 20:10:17 wessels Exp $
+ * $Id: client_side.cc,v 1.409 1998/10/09 17:52:56 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1526,6 +1526,7 @@ clientKeepaliveNextRequest(clientHttpRequest * http)
        debug(33, 1) ("clientKeepaliveNextRequest: FD %d Sending next\n",
            conn->fd);
        entry = http->entry;
+       assert(entry);
        if (0 == storeClientCopyPending(entry, http)) {
            if (entry->store_status == STORE_ABORTED)
                debug(33, 0) ("clientKeepaliveNextRequest: entry->swap_status == STORE_ABORTED\n");
@@ -1634,13 +1635,10 @@ static log_type
 clientProcessRequest2(clientHttpRequest * http)
 {
     const request_t *r = http->request;
-    const cache_key *key;
     StoreEntry *e;
-    key = storeKeyPublic(http->uri, r->method);
     e = http->entry = storeGetPublic(http->uri, r->method);
     if (r->method == METHOD_HEAD && e == NULL) {
        /* We can generate a HEAD reply from a cached GET object */
-       key = storeKeyPublic(http->uri, METHOD_GET);
        e = http->entry = storeGetPublic(http->uri, METHOD_GET);
     }
 #if USE_CACHE_DIGESTS
@@ -1648,18 +1646,22 @@ clientProcessRequest2(clientHttpRequest * http)
 #endif
     if (NULL == e) {
        /* this object isn't in the cache */
+       debug(33,3)("clientProcessRequest2: storeGet() MISS\n");
        return LOG_TCP_MISS;
     }
     if (Config.onoff.offline) {
+       debug(33,3)("clientProcessRequest2: offline HIT\n");
        http->entry = e;
        return LOG_TCP_HIT;
     }
     if (!storeEntryValidToSend(e)) {
+       debug(33,3)("clientProcessRequest2: !storeEntryValidToSend MISS\n");
        http->entry = NULL;
        return LOG_TCP_MISS;
     }
     if (EBIT_TEST(e->flags, ENTRY_SPECIAL)) {
        /* Special entries are always hits, no matter what the client says */
+       debug(33,3)("clientProcessRequest2: ENTRY_SPECIAL HIT\n");
        http->entry = e;
        return LOG_TCP_HIT;
     }
@@ -1672,16 +1674,23 @@ clientProcessRequest2(clientHttpRequest * http)
     }
 #endif
     if (r->flags.nocache) {
+       debug(33,3)("clientProcessRequest2: no-cache REFRESH MISS\n");
        http->entry = NULL;
        ipcacheReleaseInvalid(r->host);
        return LOG_TCP_CLIENT_REFRESH_MISS;
-    } else if (r->range && httpHdrRangeWillBeComplex(r->range)) {
-       /* Some clients break if we return "200 OK" for a Range request.
-        * We would have to return "200 OK" for a _complex_ Range request
-        * that is also a HIT. Thus, let's prevent HITs on complex Range requests */
+    }
+    if (r->range && httpHdrRangeWillBeComplex(r->range)) {
+       /*
+        * Some clients break if we return "200 OK" for a Range
+        * request.  We would have to return "200 OK" for a _complex_
+        * Range request that is also a HIT. Thus, let's prevent HITs
+        * on complex Range requests
+        */
+       debug(33,3)("clientProcessRequest2: complex range MISS\n");
        http->entry = NULL;
        return LOG_TCP_MISS;
     }
+    debug(33,3)("clientProcessRequest2: default HIT\n");
     http->entry = e;
     return LOG_TCP_HIT;
 }
index 1c64437c0ed4b69970747bb988ade71958c35a8a..458f051468c23915e5f5c7f2f7ecff3c9132a047 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.325 1998/09/24 20:41:21 rousskov Exp $
+ * $Id: http.cc,v 1.326 1998/10/09 17:52:58 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
index 65d40818fbb33589053047e91896a26533cbe8b5..6d391f246a9df2fee0eb9b0d8e38c0e001402fac 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.467 1998/10/09 17:46:35 wessels Exp $
+ * $Id: store.cc,v 1.468 1998/10/09 17:53:01 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -289,7 +289,7 @@ storeGetPublic(const char *uri, const method_t method)
        key = storeKeyPublicOld(uri, method);
        e = storeGet(key);
     }
-    return storeGet(key);
+    return e;
 }
 
 static int