]> git.kaiwu.me - haproxy.git/commit
MINOR: vars: implement dump_all_vars() sample fetch
authorHyeonggeun Oh <hyeonggeun.oh@plaintexting.com>
Mon, 12 Jan 2026 18:07:16 +0000 (03:07 +0900)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Jan 2026 09:44:19 +0000 (10:44 +0100)
commit9f766b2056279c71a1c2446f7846f3156ec26f5f
tree1d095a20144086f47248ae3e3c82174fce8c3ac5
parent95e8483b35f1fd8e80e88c5fce37df72e294cd31
MINOR: vars: implement dump_all_vars() sample fetch

This patch implements dump_all_vars([scope],[prefix]) sample fetch
function that dumps all variables in a given scope, optionally
filtered by name prefix.

Output format: var1=value1, var2=value2, ...
- String values are quoted and escaped (", , \r, \n, \b, \0)
- All sample types are supported via sample_convert()
- Scope can be: sess, txn, req, res, proc
- Prefix filtering is optional

Example usage:
  http-request return string %[dump_all_vars(txn)]
  http-request return string %[dump_all_vars(txn,user)]

This addresses GitHub issue #1623.
src/vars.c