------------------------------------------------------------ revno: 12372 tags: SQUID_3_3_0_1 revision-id: squid3@treenet.co.nz-20121020112946-carr1ox63p1wdptu parent: squid3@treenet.co.nz-20121020104913-qhwo23e2pf8puk13 committer: Amos Jeffries branch nick: 3.3 timestamp: Sat 2012-10-20 05:29:46 -0600 message: Remove the refresh_pattern ignore-no-cache option With the HTTP/1.1 Cache-Control:no-cache compliance upgrade this option became obsolete. Its main use-case was to force caching of responses which contained this control. Revalidation is now happening and no-cache objects are cached by default. The one remaining effect of ignoring no-cache is to prevent no-cache from allowing authenticated responses being cached. Which is the opposite of its usually expected result and allowing that change of behaviour would be counter productive. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121020112946-carr1ox63p1wdptu # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 28eb54b8f8609ce00cb70f3632177a2a3992ea53 # timestamp: 2012-10-20 12:26:55 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121020104913-\ # qhwo23e2pf8puk13 # # Begin patch === modified file 'src/RefreshPattern.h' --- src/RefreshPattern.h 2012-09-21 13:27:44 +0000 +++ src/RefreshPattern.h 2012-10-20 11:29:46 +0000 @@ -49,7 +49,6 @@ unsigned int override_lastmod:1; unsigned int reload_into_ims:1; unsigned int ignore_reload:1; - unsigned int ignore_no_cache:1; unsigned int ignore_no_store:1; unsigned int ignore_must_revalidate:1; unsigned int ignore_private:1; === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2012-10-16 23:40:01 +0000 +++ src/cache_cf.cc 2012-10-20 11:29:46 +0000 @@ -809,15 +809,6 @@ } for (R = Config.Refresh; R; R = R->next) { - if (!R->flags.ignore_no_cache) - continue; - - debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP"); - - break; - } - - for (R = Config.Refresh; R; R = R->next) { if (!R->flags.ignore_no_store) continue; @@ -2682,9 +2673,6 @@ if (head->flags.ignore_reload) storeAppendPrintf(entry, " ignore-reload"); - if (head->flags.ignore_no_cache) - storeAppendPrintf(entry, " ignore-no-cache"); - if (head->flags.ignore_no_store) storeAppendPrintf(entry, " ignore-no-store"); @@ -2723,7 +2711,6 @@ int override_lastmod = 0; int reload_into_ims = 0; int ignore_reload = 0; - int ignore_no_cache = 0; int ignore_no_store = 0; int ignore_must_revalidate = 0; int ignore_private = 0; @@ -2802,8 +2789,6 @@ override_expire = 1; else if (!strcmp(token, "override-lastmod")) override_lastmod = 1; - else if (!strcmp(token, "ignore-no-cache")) - ignore_no_cache = 1; else if (!strcmp(token, "ignore-no-store")) ignore_no_store = 1; else if (!strcmp(token, "ignore-must-revalidate")) @@ -2822,6 +2807,8 @@ /* tell client_side.c that this is used */ #endif + } else if (!strcmp(token, "ignore-no-cache")) { + debugs(22, DBG_PARSE_NOTE(2), "UPGRADE: refresh_pattern option 'ignore-no-cache' is obsolete. Remove it."); } else debugs(22, DBG_CRITICAL, "refreshAddToList: Unknown option '" << pattern << "': " << token); } @@ -2868,9 +2855,6 @@ if (ignore_reload) t->flags.ignore_reload = 1; - if (ignore_no_cache) - t->flags.ignore_no_cache = 1; - if (ignore_no_store) t->flags.ignore_no_store = 1; === modified file 'src/cf.data.pre' --- src/cf.data.pre 2012-09-22 07:17:28 +0000 +++ src/cf.data.pre 2012-10-20 11:29:46 +0000 @@ -4228,7 +4228,6 @@ override-lastmod reload-into-ims ignore-reload - ignore-no-cache ignore-no-store ignore-must-revalidate ignore-private @@ -4261,12 +4260,6 @@ this feature could make you liable for problems which it causes. - ignore-no-cache ignores any ``Pragma: no-cache'' and - ``Cache-control: no-cache'' headers received from a server. - The HTTP RFC never allows the use of this (Pragma) header - from a server, only a client, though plenty of servers - send it anyway. - ignore-no-store ignores any ``Cache-control: no-store'' headers received from a server. Doing this VIOLATES the HTTP standard. Enabling this feature could make you === modified file 'src/http.cc' --- src/http.cc 2012-10-20 06:29:43 +0000 +++ src/http.cc 2012-10-20 11:29:46 +0000 @@ -422,7 +422,7 @@ #if 0 // waiting on HTTPbis WG agreement before we do this // NP: given the must-revalidate exception we should also be able to exempt no-cache. - } else if (rep->cache_control->noCache() && !REFRESH_OVERRIDE(ignore_no_cache)) { + } else if (rep->cache_control->noCache()) { debugs(22, 3, HERE << "Authenticated but server reply Cache-Control:no-cache"); mayStore = true; #endif