]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: flt-http-comp: Enable implicit filters independently per direction
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Sep 2026 13:51:49 +0000 (15:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:35 +0000 (16:17 +0200)
commit878fe6dd86eddae5a578f845e1a92ffdf10fbf23
tree7f9f27f6481780f31864a667a69c5f71ad6f728c
parentd759f4744cdd29e118cf84589463352ab28be16d
BUG/MINOR: flt-http-comp: Enable implicit filters independently per direction

Since the compression filter was split into comp-req and comp-res,
check_implicit_http_comp_flt() still treated either explicit declaration as
sufficient to suppress all implicit compression filters. Otherwise it always
added both filters, regardless of the configured directions.

Thus, explicitly placing the request filter could prevent response
compression from being enabled, and conversely. An explicit declaration must
only fix that filter's position, not disable the other direction selected by
compression directives.

Track the two filters separately and append each missing filter when its
direction is enabled. Preserve existing explicit positions and continue to
require explicit placement of missing filters when another filter makes
their ordering ambiguous. Only the response compression filter is forbidden
before a cache filter; request compression does not affect the cached
response.

Do not require a local algorithm when adding an implicit filter. Direction
flags are combined across the frontend and backend, and the algorithm may be
supplied by the opposite proxy. The runtime checks still prevent any
compression when no algorithm is available for the selected direction.

This patch relies on following commits:

  * MINOR: flt-http-comp: Use compression options as filter config
  * MEDIUM: flt-http-comp: Enable compression directions from algorithms

The series should be backported to 3.4.
src/flt_http_comp.c