]> git.kaiwu.me - haproxy.git/commitdiff
DOC: config: mention that section 8.6 does not apply to the cbor encoding
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Sep 2026 04:53:11 +0000 (06:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Sep 2026 06:33:43 +0000 (08:33 +0200)
Section 8.6 of the config manual explains that the characters outside
the 32..126 range are not emitted as-is in the logs but encoded as a '#'
followed by their two hex digits, so that a log line cannot upset a
terminal.

However, this doesn't apply to cbor output, which can come as a surprise
to the reader. The reason is that cbor output already emits all bytes as
hex chars by default (hence the protection is granted), but supports raw
mode with "+bin" in which case the output will be consumed by a suitable
cbor parser and not by a terminal. In such a case we want the output to
remain verbatim and certainly not to be escaped. So let's update the doc
to explain this.

doc/configuration.txt

index bb80e83becc9236dfee953ca042f519f06d7ed75..fc90d89f285e9a1a9cee1b570a0c72346f726df9 100644 (file)
@@ -30590,6 +30590,10 @@ escape character '#' itself is also encoded to avoid any ambiguity ("#23"). It
 is the same for the character '"' which becomes "#22", as well as '{', '|' and
 '}' when logging headers.
 
+This does not apply to the cbor encoding, which already uses either safe hex
+digits, or properly delimited binary blocks that will not be sent to a terminal
+but will be consumed by a CBOR parser.
+
 Note that the space character (' ') is not encoded in headers, which can cause
 issues for tools relying on space count to locate fields. A typical header
 containing spaces is "User-Agent".