REGTESTS: log: check which log-format tags escape control characters
It is not obvious which log-format construct protects the log against
control characters coming from the request, and "+E" is easily believed
to be the one, while it is in fact the RFC5424 structured-data escaping
and only covers '"', '\' and ']' (see rfc5424_escape_map).
The test logs one same captured header value, containing a raw ESC and a
']', through three different tags, and shows that:
smp |A?[31m]B| %[capture.req.hdr(0)] nothing escaped
esc |A?[31m\]B| %{+E}[capture.req.hdr(0)] ']' escaped, not the ESC
hdr |{A#1B[31m]B}| %hr ESC encoded as "#1B"
Only %hr and %r, which use hdr_encode_map and url_encode_map, encode the
0x00-0x1f and 0x7f-0xff ranges. A sample expression emits them verbatim
whatever the options, so a config using %[...] to log request data puts
control characters in the logs and in the rings.
The dump is read with "show events -s" so that a control character which
made it to the ring shows up as a '?', which avoids embedding one into
this file. The test does not depend on the delimiter fix from the two
previous commits since it does not use "-0".