]> git.kaiwu.me - haproxy.git/commit
MINOR: flt-http-comp: Use compression options as filter config
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Oct 2026 19:51:04 +0000 (21:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:35 +0000 (16:17 +0200)
commitd759f4744cdd29e118cf84589463352ab28be16d
tree10fea4bea99cd8f8c40af36222eba7d0fab84975
parent0926d4dd9304e1158bcf3649535cc57ee9a4fd33
MINOR: flt-http-comp: Use compression options as filter config

All comp filter configurations left their ->conf pointer NULL: the request
and response compression filters resolved the proxy options at runtime,
through strm_fe(s)->comp and s->be->comp, so the pointer was never used by
the stream callbacks.

Now store the proxy's compression configuration (px->comp) in the filter
configurations, for the explicit "filter compression", "filter comp-req" and
"filter comp-res" declarations as well as for the filters implicitly
declared by check_implicit_http_comp_flt(). The compression options become
the actual configuration of these filters, like the decompression filters
already do with their direction.

No stream callback is changed: the runtime resolution through the frontend
and backend proxies is preserved, since the options of both proxies are
combined to compress a message, with a priority to the backend ones. But the
attach callback can now rely on FLT_CONF() to know whether a filter can be
useful, and the http-comp filter instances will set the same pointer.

The configuration remains owned by the proxy and released with it: the
compression filters have no deinit callback freeing ->conf.
src/flt_http_comp.c