]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: http-act: Make a copy of the sample expr in (set/add)-headers-bin
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jun 2026 06:07:45 +0000 (08:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jun 2026 16:03:01 +0000 (18:03 +0200)
commit43932db8513611407c024c7268f6018bbe8bdaf2
tree57ebee1c15127dd656b34f1bad3491166363b60b
parent7266ed8c30eddfcb90a04f787da74d5ffa942333
BUG/MEDIUM: http-act: Make a copy of the sample expr in (set/add)-headers-bin

For set-headers-bin and add-header-bin actions, the new HTX headers to add
or set are extracted from the result of a sample expression evaluation. This
result must be copied because it is based a static trash chunk and internal
functions manipulating HTX messages also use static chunks. So to not
overwrite the sample expression, for instance because a defrag is performed,
it must be copied into a dynamically allocated chunk.

It is also important because the sample expression may be based on part of
the HTX message itself.

This patch must be backported to 3.4.
src/http_act.c