]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: vars: make the tcp/http unset-var() action support conditions
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 14:43:29 +0000 (16:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 14:48:15 +0000 (16:48 +0200)
commit4b7531f48b5aa66d11fcee2836c201644bfb6a71
tree79919cd6af90ecfc886c23179e3ec7939bb13ccf
parentf37b140b06b9963dea8adaf5e13b5b57cd219c74
BUG/MEDIUM: vars: make the tcp/http unset-var() action support conditions

Patrick Hemmer reported that http-request unset-var(foo) if ... fails to
parse. The reason is that it reuses the same parser as "set-var(foo)" which
makes a special case of the arguments, supposed to be a sample expression
for set-var, but which must not exist for unset-var. Unfortunately the
parser finds "if" or "unless" and believes it's an expression. Let's simply
drop the test so that the outer rule parser deals with potential extraneous
keywords.

This should be backported to all versions supporting unset-var().
src/vars.c