]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: sample: urlp can't match an empty value
authorCyril Bonté <cyril.bonte@free.fr>
Thu, 26 Nov 2015 20:39:56 +0000 (21:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Nov 2015 22:51:42 +0000 (23:51 +0100)
commitce1ef4df0135f9dc1cb6691395eacb487015fe3e
tree993629855637459c747bd9c441f144554133aa88
parenta1c2b2c4f3e65d198a0a4b25a4f655f7b307a855
BUG/MEDIUM: sample: urlp can't match an empty value

Currently urlp fetching samples were able to find parameters with an empty
value, but the return code depended on the value length. The final result was
that acls using urlp couldn't match empty values.

Example of acl which always returned "false":
  acl MATCH_EMPTY urlp(foo) -m len 0

The fix consists in unconditionally return 1 when the parameter is found.

This fix must be backported to 1.6 and 1.5.
src/proto_http.c