mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
Many actions take arguments after a parenthesis. When this happens, they have to be tagged in the parser with KWF_MATCH_PREFIX so that a sub-word is sufficient (since by default the whole block including the parenthesis is taken). The problem with this is that the parser stops on the first match. This was OK years ago when there were very few actions, but over time new ones were added and many actions are the prefix of another one (e.g. "set-var" is the prefix of "set-var-fmt"). And what happens in this case is that the first word is picked. Most often that doesn't cause trouble because such similar-looking actions involve the same custom parser so actually the wrong selection of the first entry results in the correct parser to be used anyway and the error to be silently hidden. But it's getting worse when accidentally declaring prefixes in multiple files, because in this case it will solely depend on the object file link order: if the longest name appears first, it will be properly detected, but if it appears last, its other prefix will be detected and might very well not be related at all and use a distinct parser. And this is random enough to make some actions succeed or fail depending on the build options that affect the linkage order. Worse: what if a keyword is the prefix of another one, with a different parser but a compatible syntax ? It could seem to work by accident but not do the expected operations. The correct solution is to always look for the longest matching name. This way the correct keyword will always be matched and used and there will be no risk to randomly pick the wrong anymore. This fix must be backported to the relevant stable releases. |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
BSDmakefile | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)