]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: hlua/filters: Track the payload phase per channel
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Oct 2026 13:32:03 +0000 (15:32 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 23 Oct 2026 17:36:57 +0000 (19:36 +0200)
commit0676fccefb8b7be7f057502fbd97c4798a8932ac
tree1bac7326454e214d8dfdc00548954e320dd01f9e
parentad082111a04b4387f8aa76e386a2f340f9583bd2
BUG/MINOR: hlua/filters: Track the payload phase per channel

HLUA_FLT_CTX_FL_PAYLOAD is used to know if a filter is in its payload
forwarding stage, when its http_payload or tcp_payload callback is
called, because the data of a channel may only be manipulated in this
context. But this was a per-context flag, shared by both channels,
while the payload phase is specific to a channel. Thus, when a filter
processed the request payload, a forbidden operation could be performed
on the response data while it was analyzed, and reciprocally.

Now the payload phase is tracked per channel, with a dedicated flag for
the request and the response. All the data manipulation functions now
check the flag of the channel on which they operate. The flags are set
or cleared by the payload and analysis callbacks of the corresponding
channel. In particular, start_analyze only clears the flag of the
channel being analyzed, so starting the analysis of a channel no longer
resets the payload phase of the other one.
src/hlua.c