mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: cache/htx: Be sure to count partial trailers
When a chunked object is served from the cache, If the trailers are not pushed in the channel's buffer in one time, we still have to count them in the total written bytes in the buffer. This patch must be backported to 1.9.
This commit is contained in:
parent
68b1bbd767
commit
74b41ba025
@ -1027,12 +1027,12 @@ static void htx_cache_io_handler(struct appctx *appctx)
|
|||||||
unsigned int len = first->len - sizeof(*cache_ptr) - appctx->ctx.cache.sent;
|
unsigned int len = first->len - sizeof(*cache_ptr) - appctx->ctx.cache.sent;
|
||||||
|
|
||||||
ret = htx_cache_dump_data(appctx, res_htx, HTX_BLK_TLR, len);
|
ret = htx_cache_dump_data(appctx, res_htx, HTX_BLK_TLR, len);
|
||||||
|
total += ret;
|
||||||
if (ret < len) {
|
if (ret < len) {
|
||||||
si_rx_room_blk(si);
|
si_rx_room_blk(si);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
total += ret;
|
|
||||||
if (first->len == sizeof(*cache_ptr) + appctx->ctx.cache.sent)
|
if (first->len == sizeof(*cache_ptr) + appctx->ctx.cache.sent)
|
||||||
appctx->st0 = HTX_CACHE_EOM;
|
appctx->st0 = HTX_CACHE_EOM;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user