]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: cache: ignore cache on redundant origin/referer
authorWilly Tarreau <w@1wt.eu>
Sun, 16 Aug 2026 06:09:32 +0000 (08:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 11:51:07 +0000 (13:51 +0200)
commit34dbc5e69fb1f59d4fc0614e8402c12cf489b595
tree564a97fbe940e1b4d3afb8f5ea193bc7b397741c
parent8a4b50b0743105011e2ea8dbc4a0992466067b04
BUG/MEDIUM: cache: ignore cache on redundant origin/referer

The cache's Vary header processing to consider secondary keys used only
the first occurrence of Origin and Referer. These header are single-valued
so this is not supposed to be a problem, however the server's behavior
when dealing with more than one will not necessarily be predictable, so
we'd rather just bypass the cache when facing such requests.

default_normalizer() now returns -1 if a second occurrence is found,
making http_request_build_secondary_key() return a failure and never
match from secondary keys. This way it doesn't affect the standard case
and doesn't take risks with border-line ones.

The vary regtest was completed with various combinations.

Reported-by: Claude (ANT-2026-FQEGP4YG)
This should be backported to all stable versions.
doc/configuration.txt
reg-tests/cache/vary.vtc
src/cache.c