mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-22 05:36:56 +00:00
BUG/MEDIUM: htx: count the amount of copied data towards the final count
Currently htx_xfer_blks() respects the <count> limit for each block instead of for the sum of the transfered blocks. This causes it to return slightly more than requested when both headers and data are present in the source buffer, which happens early in the transfer when the reserve is still active. Thus with large enough headers, the reserve will not be respected. Note that this function is only called from h2_rcv_buf() thus this only affects data entering over H2 (H2 requests or H2 responses). This fix must be backported to 1.9.
This commit is contained in:
parent
eaf0d2a936
commit
2bf0c13261
@ -482,8 +482,8 @@ struct htx_ret htx_xfer_blks(struct htx *dst, struct htx *src, uint32_t count,
|
||||
max = htx_free_data_space(dst);
|
||||
if (max > count)
|
||||
max = count;
|
||||
if (sz > max) {
|
||||
sz = max;
|
||||
if (ret + sz > max) {
|
||||
sz = max - ret;
|
||||
info = (type << 28) + sz;
|
||||
/* Headers and pseudo headers must be fully copied */
|
||||
if (type < HTX_BLK_DATA || !sz)
|
||||
|
Loading…
Reference in New Issue
Block a user