[master] 42f3ee8c8 Field values are case insensitive
Federico G. Schwindt
fgsch at lodoss.net
Thu Jan 3 20:16:06 UTC 2019
commit 42f3ee8c8d1e7b646f60051f5b0282a6c59820b8
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Thu Dec 27 17:14:37 2018 +0000
Field values are case insensitive
Should address "HTTP cache must not use a cached response with
Cache-Control: No-CaChE, even with max-age and Expires" from
https://cache-tests.fyi.
diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl
index a578a9c33..4835a231c 100644
--- a/bin/varnishd/builtin.vcl
+++ b/bin/varnishd/builtin.vcl
@@ -156,9 +156,9 @@ sub vcl_backend_response {
return (deliver);
} else if (beresp.ttl <= 0s ||
beresp.http.Set-Cookie ||
- beresp.http.Surrogate-control ~ "no-store" ||
+ beresp.http.Surrogate-control ~ "(?i)no-store" ||
(!beresp.http.Surrogate-Control &&
- beresp.http.Cache-Control ~ "no-cache|no-store|private") ||
+ beresp.http.Cache-Control ~ "(?i:no-cache|no-store|private)") ||
beresp.http.Vary == "*") {
# Mark as "Hit-For-Miss" for the next 2 minutes
set beresp.ttl = 120s;
More information about the varnish-commit
mailing list