]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache: make sure not to cache requests with absolute-uri
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Oct 2019 12:06:34 +0000 (14:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Oct 2019 12:21:30 +0000 (14:21 +0200)
commit22c6107dba1127a1e6d204dc2a6da63c09f2d934
treecb7cfa421c74c41359dfad9d114f5e7bed91455d
parent5c0f859c27264a844d6303ab0fff110cc83f4b9c
BUG/MEDIUM: cache: make sure not to cache requests with absolute-uri

If a request contains an absolute URI and gets its Host header field
rewritten, or just the request's URI without touching the Host header
field, it can lead to different Host and authority parts. The cache
will always concatenate the Host and the path while a server behind
would instead ignore the Host and use the authority found in the URI,
leading to incorrect content possibly being cached.

Let's simply refrain from caching absolute requests for now, which
also matches what the comment at the top of the function says. Later
we can improve this by having a special handling of the authority.

This should be backported as far as 1.8.
src/cache.c