]> git.kaiwu.me - haproxy.git/commit
MEDIUM: filters: Attach filter instances to streams
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 2 Oct 2026 16:05:58 +0000 (18:05 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:36 +0000 (16:17 +0200)
commite9bfbe8ba7a83cb5452303185cecd771d51c38c0
treec6e672a7ac13e41182b3edf001c5ee8da5d654f6
parent32f8f5c196c221e1c39098dbc9c25c72f2cdd15d
MEDIUM: filters: Attach filter instances to streams

Instantiate the filter instances of a proxy when a stream is created
(frontend) or bound to a backend. Each enabled instance is instantiated
once, in the global flattened order, using flt_stream_add_proxy_filters().

In legacy mode the historical behavior is preserved: every filter is
immediately appended to both the request and the response filter lists.
In instance mode, the instance links are initialized but not appended,
then the request and response lists are built in independent passes that
follow the per-side instance order. Instances that were skipped because
of an incompatible payload type or because their attach callback declined
are simply not found when linking, so they end up on no channel list.

Instances are shared between streams, so the code never stores per-stream
pointers in them; the instance is looked up by its unique configuration
pointer instead. Update the comment on struct filter to state that the
request and response links are now independent.
include/haproxy/filters-t.h
src/filters.c