From: Christopher Faulet Date: Fri, 21 Dec 2018 13:53:54 +0000 (+0100) Subject: BUG/MINOR: compression/htx: Don't compress responses with unknown body length X-Git-Tag: v2.0-dev0~10 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=c963eb2a1d654abb9837ca32b5fd26fcb7ad99b7;p=haproxy.git BUG/MINOR: compression/htx: Don't compress responses with unknown body length In HTX, if the body length of a response cannot be determined, we must not try to compress it. --- diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index ddcdce614..ce0dba17c 100644 --- a/src/flt_http_comp.c +++ b/src/flt_http_comp.c @@ -914,7 +914,7 @@ htx_select_comp_reshdr(struct comp_state *st, struct stream *s, struct http_msg (txn->status != 203)) goto fail; - if (msg->flags & HTTP_MSGF_BODYLESS) + if (!(msg->flags & HTTP_MSGF_XFER_LEN) || msg->flags & HTTP_MSGF_BODYLESS) goto fail; /* content is already compressed */