mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
BUG/MEDIUM: mux-h2/htx: Respect the channel's reserve
When data are pushed in the channel's buffer, in h2_rcv_buf(), the mux-h2 must respect the reserve if the flag CO_RFL_KEEP_RSV is set. In HTX, because the stream-interface always sees the buffer as full, there is no other way to know the reserve must be respected. This patch must be backported to 1.9.
This commit is contained in:
parent
dcd8c5eed4
commit
a413e958fd
@ -5051,7 +5051,12 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf_htx = htx_from_buf(buf);
|
buf_htx = htx_from_buf(buf);
|
||||||
count = htx_free_space(buf_htx);
|
count = htx_free_data_space(buf_htx);
|
||||||
|
if (flags & CO_RFL_KEEP_RSV) {
|
||||||
|
if (count <= global.tune.maxrewrite)
|
||||||
|
goto end;
|
||||||
|
count -= global.tune.maxrewrite;
|
||||||
|
}
|
||||||
|
|
||||||
htx_ret = htx_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_EOM);
|
htx_ret = htx_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_EOM);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user