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:36:23 +0000 (16:36 +0100)
commit934630a682fc4b5fb4902c254de17fcbe2ac84ee
tree33f16e01f1b81cbea72a300f245c3c14187f2221
parent8cac341124e2b79c2a924ad186a114b39546298e
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.

(cherry picked from commit 97fc8da2643531ade4163d6662f13f76fa59d677)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_fetch.c