mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-15 03:56:56 -04:00
BUG/MINOR: hq-interop: support full demux buf on large response
When dealing with large responses, QUIC MUX demux buffer may be full. In this case, QC_SF_DEM_FULL flag must be set to pause transcoding. This patch implements it for HTTP/0.9 response transcoding, similarly to what HTTP/3 already provides. This is a backend side fix. This should be backported up to 3.3.
This commit is contained in:
parent
e79af3d846
commit
42bb097c9e
1 changed files with 10 additions and 1 deletions
|
|
@ -147,18 +147,27 @@ static ssize_t hq_interop_rcv_buf_res(struct qcs *qcs, struct buffer *b, int fin
|
|||
BUG_ON(b_head(b) + to_copy > b_wrap(b)); /* TODO */
|
||||
|
||||
htx_space = htx_free_data_space(htx);
|
||||
if (!htx_space) {
|
||||
qcs->flags |= QC_SF_DEM_FULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (to_copy > htx_space) {
|
||||
to_copy = htx_space;
|
||||
fin = 0;
|
||||
}
|
||||
|
||||
htx_sent = htx_add_data(htx, ist2(b_head(b), to_copy));
|
||||
BUG_ON(htx_sent < to_copy); /* TODO */
|
||||
if (htx_sent < to_copy) {
|
||||
qcs->flags |= QC_SF_DEM_FULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (fin && to_copy == htx_sent)
|
||||
htx->flags |= HTX_FL_EOM;
|
||||
}
|
||||
|
||||
out:
|
||||
htx_to_buf(htx, htx_buf);
|
||||
return htx_sent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue