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.
This commit is contained in:
Christopher Faulet 2018-12-21 14:53:54 +01:00
parent 2fa66c3b93
commit c963eb2a1d

View File

@ -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 */