]> git.kaiwu.me - haproxy.git/commit
MINOR: tools: add chunk_escape_string() helper function
authorHyeonggeun Oh <hyeonggeun.oh@plaintexting.com>
Mon, 12 Jan 2026 18:07:15 +0000 (03:07 +0900)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Jan 2026 09:44:19 +0000 (10:44 +0100)
commit25564b6075b629cdb0f4355d7e0c69605f17e0a0
tree5bdb06bb66a25543b7c0dae69d4ade6490664680
parent7e85391a9e580a416af001d4c32f63f0973a607f
MINOR: tools: add chunk_escape_string() helper function

This function takes a string appends it to a buffer in a format
compatible with most languages (double-quoted, with special characters
escaped). It handles standard escape sequences like \n, \r, \", \\.

This generic utility is desined to be used for logging or debugging
purposes where arbitrary string data needs to be safely emitted without
breaking the output format. It will be primarily used by the upcoming
dump_all_vars() sample fetch to dump variable contents safely.
include/haproxy/tools.h
src/tools.c