]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: fix global lf_expr node options behavior (2nd try)
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 29 Apr 2024 13:58:36 +0000 (15:58 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 30 Apr 2024 08:10:35 +0000 (10:10 +0200)
commit9931a62c3fd5a2252fe603833b717652302af1d5
tree1e4f318b414b76852e8b013d3554b5499f918186
parent97240d01b3e111a72265a953e3ca774680df8fef
BUG/MINOR: log: fix global lf_expr node options behavior (2nd try)

In 98b44e8 ("BUG/MINOR: log: fix global lf_expr node options behavior"),
I properly restored global node options behavior for when encoding is
not used, however the fix is not optimal when encoding is involved:

Indeed, encoding logic in sess_build_logline() relies on global node
options to know if encoding must be handled expression-wide or
individually. However, because of the above fix, if an expression is
made of 1 or multiple nodes that all set an encoding option manually
(without '%o'), we consider that the option was set globally, but
that's probably not what the user intended. Instead we should only
evaluate global options from '%o', so that it remains possible to
skip global encoding when needed.

No backport needed.
include/haproxy/log-t.h
src/log.c