mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MINOR: http: deinitialize compression after a compression error
If for some reason, the compression returns an error, the compression is not deinitialized which also means that any pending data are not flushed and could be lost, especially in the chunked-encoded case. No backport is needed.
This commit is contained in:
parent
d01f426e62
commit
6fef8ae047
1 changed files with 5 additions and 0 deletions
|
|
@ -6434,6 +6434,11 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi
|
|||
return 0;
|
||||
|
||||
aborted_xfer:
|
||||
if (unlikely(compressing)) {
|
||||
http_compression_buffer_end(s, &res->buf, &tmpbuf, msg->msg_state >= HTTP_MSG_TRAILERS);
|
||||
compressing = 0;
|
||||
}
|
||||
|
||||
txn->rsp.msg_state = HTTP_MSG_ERROR;
|
||||
/* don't send any error message as we're in the body */
|
||||
stream_int_retnclose(res->cons, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue