]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: compression: Improve the way Vary header is added
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 May 2023 09:18:21 +0000 (11:18 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 May 2023 09:25:31 +0000 (11:25 +0200)
commit535dd920df1d5ecb175270037276e1e1290cb992
tree403e3a6ee7feddba1f3f3fa1b81f97aafb44c4da
parentc8bb9aeb07bfae0b7cf421611fdddcb924508adc
MINOR: compression: Improve the way Vary header is added

When a message is compressed, A "Vary" header is added with
"accept-encoding" value. However, a new header is always added, regardless
there is already a Vary header or not. In addition, if there is already a
Vary header, there is no check on values to be sure "accept-encoding" value
is not already there. So it is possible to have it twice.

To improve this part, we now test Vary header values and "accept-encoding"
is only added if it was not found. In addition, "accept-encoding" value is
appended to the last Vary header found, if any. Otherwise, a new header is
added.
reg-tests/compression/vary.vtc
src/flt_http_comp.c