]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: http-fetch: do not count Set-Cookie attributes as cookies
authorWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 09:31:39 +0000 (11:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:11:24 +0000 (16:11 +0200)
commit813c25055d539802d68b503913a6a298f85d491a
tree1fb9bcc463b750aabb048c3cfe9a05c28fc77378
parentc3c0abc6554517d93eb2a88fb532dfe5818ada0b
BUG/MINOR: http-fetch: do not count Set-Cookie attributes as cookies

A Set-Cookie header contains a single cookie, and other elements on
the same line are not cookies but attributes (which can easily be
mistaken for them by a parser). That's what happens for res.cook_cnt()
which uses the same parser as req.cook_cnt() and counts apparent cookie
values without figuring it's parsing attributes. Let's just do like for
res.cookie_names() and check for a request or response before looping,
so that we can now count a single cookie per set-cookie response.

This can be backported to all stable versions.
src/http_fetch.c