From: Christopher Faulet Date: Tue, 20 Oct 2026 09:24:21 +0000 (+0200) Subject: BUG/MINOR: flt-decomp: Report error about filter order in lagacy mode only X-Git-Tag: v3.5-dev10~103 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=385a72f0f28d45d4835ea36ebf542ffc662e634b;p=haproxy.git BUG/MINOR: flt-decomp: Report error about filter order in lagacy mode only Response decompression filter cannot be placed after the cache-store one only in legacy mode. With the new model, it is no longer an error because order is more explicit and easier to configure. No backport needed --- diff --git a/src/flt_decomp.c b/src/flt_decomp.c index 871947941..645b64ad1 100644 --- a/src/flt_decomp.c +++ b/src/flt_decomp.c @@ -1363,19 +1363,19 @@ static int decomp_check_order(struct flt_conf *f, void *data) if ((ctx->px->cap & PR_CAP_FE) && f->id == decomp_req_flt_id) { ctx->decomp_req_seen = 1; - return 0; } - if ((ctx->px->cap & PR_CAP_BE) && f->id == decomp_res_flt_id) { - if (ctx->cache_seen) { - ha_alert("config: %s '%s': cache filter declared before a decompression filter on the response is invalid.\n", - proxy_type_str(ctx->px), ctx->px->id); - return 1; + else if (flt_use_legacy_filter(ctx->px)) { + if ((ctx->px->cap & PR_CAP_BE) && f->id == decomp_res_flt_id) { + if (ctx->cache_seen) { + ha_alert("config: %s '%s': cache filter declared before a decompression filter on the response is invalid.\n", + proxy_type_str(ctx->px), ctx->px->id); + return 1; + } + ctx->decomp_res_seen = 1; } - ctx->decomp_res_seen = 1; - return 0; + if (f->id == cache_store_flt_id) + ctx->cache_seen = 1; } - if (flt_use_legacy_filter(ctx->px) && f->id == cache_store_flt_id) - ctx->cache_seen = 1; return 0; }