[6.0] e42d926bf Field values are case insensitive
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Jun 27 17:05:10 UTC 2019
commit e42d926bf7a613e56d2dc543b77c0e79141040f8
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