From: wessels <> Date: Tue, 12 Jan 1999 07:20:42 +0000 (+0000) Subject: oops, we didn't cache cache-control: no-cache X-Git-Tag: SQUID_3_0_PRE1~2424 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16f019f5625d9babc7bbe86e93c599d7737b81f3;p=thirdparty%2Fsquid.git oops, we didn't cache cache-control: no-cache --- diff --git a/src/client_side.cc b/src/client_side.cc index 8519af5011..92a0d6eb8e 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.429 1999/01/11 22:54:17 wessels Exp $ + * $Id: client_side.cc,v 1.430 1999/01/12 00:20:42 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -698,6 +698,7 @@ clientInterpretRequestHeaders(clientHttpRequest * http) { request_t *request = http->request; const HttpHeader *req_hdr = &request->header; + int no_cache = 0; #if USE_USERAGENT_LOG const char *str; #endif @@ -707,17 +708,22 @@ clientInterpretRequestHeaders(clientHttpRequest * http) request->flags.ims = 1; if (httpHeaderHas(req_hdr, HDR_PRAGMA)) { String s = httpHeaderGetList(req_hdr, HDR_PRAGMA); - if (strListIsMember(&s, "no-cache", ',')) { + if (strListIsMember(&s, "no-cache", ',')) + no_cache++; + stringClean(&s); + } + if (request->cache_control) + if (EBIT_TEST(request->cache_control->mask, CC_NO_CACHE)) + no_cache++; + if (no_cache) { #if HTTP_VIOLATIONS - if (Config.onoff.reload_into_ims) - request->flags.nocache_hack = 1; - else if (refresh_nocache_hack) - request->flags.nocache_hack = 1; - else + if (Config.onoff.reload_into_ims) + request->flags.nocache_hack = 1; + else if (refresh_nocache_hack) + request->flags.nocache_hack = 1; + else #endif - request->flags.nocache = 1; - } - stringClean(&s); + request->flags.nocache = 1; } /* ignore range header in non-GETs */ if (request->method == METHOD_GET) {