From: Christopher Faulet Date: Fri, 15 Sep 2017 08:14:43 +0000 (+0200) Subject: BUG/MEDIUM: compression: Fix check on txn in smp_fetch_res_comp_algo X-Git-Tag: v1.8-dev3~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03d85538b35ac63d7126cbd5ad06c64513aba3a7;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: compression: Fix check on txn in smp_fetch_res_comp_algo The check was totally messed up. In the worse case, it led to a crash, when res.comp_algo sample fetch was retrieved on uncompressed response (with the compression enabled). This patch must be backported in 1.7. --- diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index 64c669d54d..4d5332832f 100644 --- a/src/flt_http_comp.c +++ b/src/flt_http_comp.c @@ -923,7 +923,7 @@ smp_fetch_res_comp_algo(const struct arg *args, struct sample *smp, struct filter *filter; struct comp_state *st; - if (!(txn || !(txn->rsp.flags & HTTP_MSGF_COMPRESSING))) + if (!txn || !(txn->rsp.flags & HTTP_MSGF_COMPRESSING)) return 0; list_for_each_entry(filter, &strm_flt(smp->strm)->filters, list) {