mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 04:11:02 +01:00
BUG/MEDIUM: compression: Fix loop skipping unused blocks to get the next block
In comp_http_payload(), the loop skipping unused blocks is buggy and may lead to a infinite loop if the first next block is unused. Indeed instead of iterating on blocks, we always retrieve the same one because <blk> is used instead of <next> to get the next block. This bug was introduced when the EOM block was removed in 2.4. Thus, this patch must be backported to 2.4.
This commit is contained in:
parent
5ac9a393ef
commit
86ca0e52f7
@ -181,7 +181,7 @@ comp_http_payload(struct stream *s, struct filter *filter, struct http_msg *msg,
|
|||||||
|
|
||||||
next = htx_get_next_blk(htx, blk);
|
next = htx_get_next_blk(htx, blk);
|
||||||
while (next && htx_get_blk_type(next) == HTX_BLK_UNUSED)
|
while (next && htx_get_blk_type(next) == HTX_BLK_UNUSED)
|
||||||
next = htx_get_next_blk(htx, blk);
|
next = htx_get_next_blk(htx, next);
|
||||||
|
|
||||||
if (htx_compression_buffer_init(htx, &trash) < 0) {
|
if (htx_compression_buffer_init(htx, &trash) < 0) {
|
||||||
msg->chn->flags |= CF_WAKE_WRITE;
|
msg->chn->flags |= CF_WAKE_WRITE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user