Le 12/11/2020 à 15:08, Maciej Zdeb a écrit :
Hi,
With such sample config:
frontend front
mode http
http-request set-var(txn.abc) req.cook_cnt()
http-response set-header abc %[var(txn.abc)]
bind x.x.x.x:80
default_backend back
backend back
mode http
server srv y.y.y.y:80 check
When sending 3 cookies with curl:
curl -I http://x.x.x.x <http://x.x.x.x> -H 'cookie: cook1=0; cook2=123;
cook3=22'
I expected the response header abc: 3, instead I got abc: 0.
https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#7.3.6-req.cook_cnt
<https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#7.3.6-req.cook_cnt>
haproxy -v
HA-Proxy version 2.2.5-34b2b10 2020/11/05 - https://haproxy.org/
<https://haproxy.org/>
Hi Maciej,
I confirm the bug and it seems to fail on all versions (tested as far as 1.7).
And all sample fetches searching for a cookie value are affected too
(req.cook(), res.scook()...)
Thanks Maciej, we will handle this bug.
--
Christopher Faulet