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.
This commit is contained in:
Christopher Faulet 2017-09-15 10:14:43 +02:00 committed by Willy Tarreau
parent 0bf6fa5e40
commit 03d85538b3

View File

@ -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) {