diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index 380366b06..f8fbf4c9d 100644 --- a/src/flt_http_comp.c +++ b/src/flt_http_comp.c @@ -808,6 +808,10 @@ http_select_comp_reshdr(struct comp_state *st, struct stream *s, struct http_msg if (st->comp_algo == NULL) goto fail; + /* compression already in progress */ + if (msg->flags & HTTP_MSGF_COMPRESSING) + goto fail; + /* HTTP < 1.1 should not be compressed */ if (!(msg->flags & HTTP_MSGF_VER_11) || !(txn->req.flags & HTTP_MSGF_VER_11)) goto fail; @@ -902,6 +906,10 @@ htx_select_comp_reshdr(struct comp_state *st, struct stream *s, struct http_msg if (st->comp_algo == NULL) goto fail; + /* compression already in progress */ + if (msg->flags & HTTP_MSGF_COMPRESSING) + goto fail; + /* HTTP < 1.1 should not be compressed */ if (!(msg->flags & HTTP_MSGF_VER_11) || !(txn->req.flags & HTTP_MSGF_VER_11)) goto fail; @@ -1391,7 +1399,6 @@ check_implicit_http_comp_flt(struct proxy *proxy) fconf->conf = NULL; fconf->ops = &comp_ops; LIST_ADDQ(&proxy->filter_configs, &fconf->list); - end: return err; }