BUG/MINOR: http-fetch: Fix calls w/o parentheses of the cookie sample fetches
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Nov 2020 12:41:04 +0000 (13:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Nov 2020 15:26:10 +0000 (16:26 +0100)
commit97fc8da2643531ade4163d6662f13f76fa59d677
treefec27b7fa0570a0027da155c34d61b6af73b357a
parentdea7c209f8a77b471323dd97bdc1ac4d7a17b812
BUG/MINOR: http-fetch: Fix calls w/o parentheses of the cookie sample fetches

req.cook, req.cook_val, req.cook_cnt and and their response counterparts may be
called without cookie name. In this case, empty parentheses may be used, or no
parentheses at all. In both, the result must be the same. But only the first one
works. The second one always returns a failure. This patch fixes this bug.

Note that on old versions (< 2.2), both cases fail.

This patch must be backported in all stable versions.
src/http_fetch.c