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:52:14 +0000 (16:52 +0100)
commit8e47c2590f8a72cc31ff5af747fcf3dc000f3397
tree85445f2d28e39b93ecd972f6d939fc8060343a60
parenta862430878f4435a1a64926e945501d737f7babd
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>
(cherry picked from commit 934630a682fc4b5fb4902c254de17fcbe2ac84ee)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d6e7b958dfde326932e63a5840e4f2623fb76505)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_fetch.c