Now, the SI calls h2_rcv_buf() with the right count value. So we can rely on
it. Unlike the H1 multiplexer, it is fairly easier for the H2 multiplexer
because the HTX message already exists, we only transfer blocks from the H2S to
the channel. And this part is handled by htx_xfer_blks().
/* transfer possibly pending data to the upper layer */
if (h2c->proxy->options2 & PR_O2_USE_HTX) {
- /* in HTX mode we ignore the count argument */
h2s_htx = htx_from_buf(&h2s->rxbuf);
if (htx_is_empty(h2s_htx)) {
/* Here htx_to_buf() will set buffer data to 0 because
ret = h2s_htx->data;
buf_htx = htx_from_buf(buf);
- 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_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_EOM);