mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-22 20:32:12 +00:00
BUG/MINOR: compression/htx: Don't add the last block of data if it is empty
In HTX, when the compression filter analyze the EOM, it flushes the compression context and add the last block of compressed data. But, this block can be empty. In this case, we must ignore it.
This commit is contained in:
parent
c963eb2a1d
commit
d238ae3a9b
@ -255,10 +255,12 @@ comp_http_payload(struct stream *s, struct filter *filter, struct http_msg *msg,
|
||||
}
|
||||
if (htx_compression_buffer_end(st, &trash, 1) < 0)
|
||||
goto error;
|
||||
blk = htx_add_data_before(htx, blk, ist2(b_head(&trash), b_data(&trash)));
|
||||
if (!blk)
|
||||
goto error;
|
||||
to_forward += b_data(&trash);
|
||||
if (b_data(&trash)) {
|
||||
blk = htx_add_data_before(htx, blk, ist2(b_head(&trash), b_data(&trash)));
|
||||
if (!blk)
|
||||
goto error;
|
||||
to_forward += b_data(&trash);
|
||||
}
|
||||
msg->flags &= ~HTTP_MSGF_COMPRESSING;
|
||||
/* We let the mux add last empty chunk and empty trailers */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user