--------------------- PatchSet 465 Date: 2002/12/24 01:07:40 Author: rbcollins Branch: esi Tag: (none) Log: make ignoring cache control a member variable Members: src/http.cc:1.5.2.2->1.5.2.3 src/http.h:1.2->1.2.6.1 Index: squid3/src/http.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.cc,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -r1.5.2.2 -r1.5.2.3 --- squid3/src/http.cc 19 Dec 2002 11:25:51 -0000 1.5.2.2 +++ squid3/src/http.cc 24 Dec 2002 01:07:40 -0000 1.5.2.3 @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.5.2.2 2002/12/19 11:25:51 rbcollins Exp $ + * $Id: http.cc,v 1.5.2.3 2002/12/24 01:07:40 rbcollins Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -395,7 +395,6 @@ char *t = NULL; int room; size_t hdr_len; - int ignore_cc = 0; HttpReply *reply = entry->mem_obj->reply; Ctx ctx; debug(11, 3) ("httpProcessReplyHeader: key '%s'\n", @@ -501,12 +500,12 @@ storeTimestampsSet(entry); } /* We ignore cache-control directives as per the Surrogate specification */ - ignore_cc = 1; + ignoreCacheControl = true; httpHdrScTargetDestroy(sctusable); } } #endif - if (!ignore_cc && reply->cache_control) { + if (!ignoreCacheControl && reply->cache_control) { if (EBIT_TEST(reply->cache_control->mask, CC_PROXY_REVALIDATE)) EBIT_SET(entry->flags, ENTRY_REVALIDATE); else if (EBIT_TEST(reply->cache_control->mask, CC_MUST_REVALIDATE)) @@ -1101,6 +1100,7 @@ storeUrl(fwd->entry)); CBDATA_INIT_TYPE(HttpStateData); httpState = cbdataAlloc(HttpStateData); + httpState->ignoreCacheControl = false; storeLockObject(fwd->entry); httpState->fwd = fwd; httpState->entry = fwd->entry; Index: squid3/src/http.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.h,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -u -r1.2 -r1.2.6.1 --- squid3/src/http.h 14 Oct 2002 09:09:09 -0000 1.2 +++ squid3/src/http.h 24 Dec 2002 01:07:41 -0000 1.2.6.1 @@ -1,6 +1,6 @@ /* - * $Id: http.h,v 1.2 2002/10/14 09:09:09 squidadm Exp $ + * $Id: http.h,v 1.2.6.1 2002/12/24 01:07:41 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -58,6 +58,7 @@ int do_next_read; size_t read_sz; char buf[SQUID_TCP_SO_RCVBUF]; + bool ignoreCacheControl; }; #endif /* SQUID_HTTP_H */