<p>Changing this is an RFC 2616 violation and now requires --enable-http-violations
<tag>refresh_pattern</tag>
- <p>New set of basic patterns. These should always be listed after any custom ptterns.
+ <p>New option 'ignore-must-revalidate'.
+ <verb>
+ ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
+ headers received from a server. Doing this VIOLATES
+ the HTTP standard. Enabling this feature could make you
+ liable for problems which it causes.
+ </verb>
+ <p>New set of basic patterns. These should always be listed after any custom patterns.
They ensure RFC compliance with certain protocol and request handling in the absence
of accurate Cache-Control: and Expires: information.
<verb>
break;
}
+ for (R = Config.Refresh; R; R = R->next) {
+ if (!R->flags.ignore_must_revalidate)
+ continue;
+ debugs(22, 1, "WARNING: use of 'ignore-must-revalidate' in 'refresh_pattern' violates HTTP");
+ break;
+ }
+
for (R = Config.Refresh; R; R = R->next) {
if (!R->flags.ignore_private)
continue;
if (head->flags.ignore_no_store)
storeAppendPrintf(entry, " ignore-no-store");
+ if (head->flags.ignore_must_revalidate)
+ storeAppendPrintf(entry, " ignore-must-revalidate");
+
if (head->flags.ignore_private)
storeAppendPrintf(entry, " ignore-private");
int ignore_reload = 0;
int ignore_no_cache = 0;
int ignore_no_store = 0;
+ int ignore_must_revalidate = 0;
int ignore_private = 0;
int ignore_auth = 0;
#endif
ignore_no_cache = 1;
else if (!strcmp(token, "ignore-no-store"))
ignore_no_store = 1;
+ else if (!strcmp(token, "ignore-must-revalidate"))
+ ignore_must_revalidate = 1;
else if (!strcmp(token, "ignore-private"))
ignore_private = 1;
else if (!strcmp(token, "ignore-auth"))
if (ignore_no_store)
t->flags.ignore_no_store = 1;
+ if (ignore_must_revalidate)
+ t->flags.ignore_must_revalidate = 1;
+
if (ignore_private)
t->flags.ignore_private = 1;
ignore-reload
ignore-no-cache
ignore-no-store
+ ignore-must-revalidate
ignore-private
ignore-auth
refresh-ims
the HTTP standard. Enabling this feature could make you
liable for problems which it causes.
+ ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
+ headers received from a server. Doing this VIOLATES
+ the HTTP standard. Enabling this feature could make you
+ liable for problems which it causes.
+
ignore-private ignores any ``Cache-control: private''
headers received from a server. Doing this VIOLATES
the HTTP standard. Enabling this feature could make you
debugs(22, 3, "\tentry->timestamp:\t" << mkrfc1123(entry->timestamp));
- if (EBIT_TEST(entry->flags, ENTRY_REVALIDATE) && staleness > -1) {
+ if (EBIT_TEST(entry->flags, ENTRY_REVALIDATE) && staleness > -1
+#if HTTP_VIOLATIONS
+ && !R->flags.ignore_must_revalidate
+#endif
+ ) {
debugs(22, 3, "refreshCheck: YES: Must revalidate stale response");
return STALE_MUST_REVALIDATE;
}
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;
unsigned int ignore_auth:1;
#endif