]> git.kaiwu.me - haproxy.git/commit
MEDIUM: filters: eval the backend instances first on the response path
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 19 Oct 2026 13:41:43 +0000 (15:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Oct 2026 09:13:30 +0000 (11:13 +0200)
commit4ac7c48ed160e5b9a745e7a152066e9c5cf0c5ec
treee07c397e7a65e6ff91f97e3bd45022dce4eca9e8
parent618083953bdd160526018a41d1edd5ad0834fb5b
MEDIUM: filters: eval the backend instances first on the response path

When the backend filters are attached to a stream, they are appended to the
global and request filter lists after the frontend ones, which is the
expected order: the request reaches the frontend filters first. But they
were also appended to the response filter list, while a response travels in
the opposite direction and reaches the backend filters first.

In the new filter mode, the backend instances are now prepended to the
response filter list, preserving their own response order, so a response is
evaluated by the backend instances before the frontend ones. The request
path is unchanged.

The regression tests relying on the response evaluation order of the
instance mode were updated accordingly.
reg-tests/filters/lua-defaults.vtc
reg-tests/filters/lua-keepalive.vtc
reg-tests/filters/lua-per-thread.vtc
reg-tests/filters/lua-resume.vtc
reg-tests/filters/lua-retry.vtc
reg-tests/filters/stream-order.vtc
src/filters.c