]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cache: A 'max-age=0' cache-control directive can be overriden by a s-maxage
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Tue, 4 Jul 2023 15:13:28 +0000 (17:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jul 2023 20:15:00 +0000 (22:15 +0200)
commitca4fd73938f3eeb7bb81bc85d49b3076e2e26178
treead4de09874aeee738f0911f6f340264efff643a4
parent6aeaa73d3972198c22e6345bd2d91706ed6e89f3
BUG/MINOR: cache: A 'max-age=0' cache-control directive can be overriden by a s-maxage

When a s-maxage cache-control directive is present, it overrides any
other max-age or expires value (see section 5.2.2.9 of RFC7234). So if
we have a max-age=0 alongside a strictly positive s-maxage, the response
should be cached.

This bug was raised in GitHub issue #2203.
The fix can be backported to all stable branches.
reg-tests/cache/caching_rules.vtc
src/http_ana.c