]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: acl; Warn when matching method based on a suffix is overwritten
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Aug 2025 15:47:17 +0000 (17:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Sep 2025 13:45:05 +0000 (15:45 +0200)
commit6ea50ba462692d6dcf301081f23cab3e0f6086e4
treefc7266cc71ecb4da390180a64182af1b23d43ff0
parentc51ddd5c384d0bfb914db9ee12f70d5449d51f75
MINOR: acl; Warn when matching method based on a suffix is overwritten

From time to time, issues are reported about string matching based on suffix
(for instance path_beg). Each time, it appears these ACLs are used in
conjunction with a converter or followed by an explicit matching method
(-m).

Unfortunatly, it is not an issue but an expected behavior, while it is not
obvious. matching suffixes can be consider as aliases on the corresponding
'-m' matching method. Thus "path_beg" is equivalent to "path -m beg". When a
converter is used the original matching (string) is used and the suffix is
lost. When followed by an explicit matching method, it overwrites the
matching method based on the suffix.

It is expected but confusing. Thus now a warning is emitted because it is a
configuration issue for sure. Following sample fetch functions are concerned:

 * base
 * path
 * req.cook
 * req.hdr
 * res.hdr
 * url
 * urlp

The configuration manual was modified to make it less ambiguous.
doc/configuration.txt
src/acl.c