From: wessels <> Date: Fri, 9 Oct 1998 23:52:54 +0000 (+0000) Subject: 2.0 branch merge X-Git-Tag: SQUID_3_0_PRE1~2599 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ddc902f6211eb4034f38a37a6cfaf781fdb7de9;p=thirdparty%2Fsquid.git 2.0 branch merge --- diff --git a/src/cf.data.pre b/src/cf.data.pre index 043e3924cd..4a6da31443 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -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. diff --git a/src/client_side.cc b/src/client_side.cc index d65a08a3a4..cdb2d87da1 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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; } diff --git a/src/http.cc b/src/http.cc index 1c64437c0e..458f051468 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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 diff --git a/src/store.cc b/src/store.cc index 65d40818fb..6d391f246a 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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