]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log-format: relax parsing of '%' followed by unsupported characters
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Dec 2013 16:45:48 +0000 (17:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Dec 2013 22:31:33 +0000 (23:31 +0100)
commit06d97f935c3b30c9d1a3923827d8cdb85d6072bc
treea7e7a1701838aafb9ddcc1cb804b62cc170615a1
parentd5f624dde787d9e6d593a9059411f9e2c8a4b3d6
MEDIUM: log-format: relax parsing of '%' followed by unsupported characters

At the moment when a '%' character is followed by any unhandled character,
it is considered as a variable name, and if it cannot be resolved, a warning
is emitted and the configuration goes on.

When we start using log-format for redirect rules, it may happen that some
people accidently use '%' instead of '%%' without understanding the cause
of the issue. Thus we do two things here :

   - if a single '%' is followed by a blank or a digit, we fix it and emit a
     warning explaining how this should be done ; this ensures that existing
     configs continue to work ;

   - if a single '%' is followed by an unknown variable name, we report it
     and explain how to emit a verbatim '%' in case this is what the user
     desired.
doc/configuration.txt
src/log.c