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 -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

haproxy -v
HA-Proxy version 2.2.5-34b2b10 2020/11/05 - https://haproxy.org/

Reply via email to