From: Amaury Denoyelle Date: Mon, 22 Jun 2026 12:35:04 +0000 (+0200) Subject: BUG/MINOR: hq-interop: support full demux buf on large response X-Git-Tag: v3.5-dev1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42bb097c9e21278de28a2c4d17405eb415dcca9d;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/hq_interop.c b/src/hq_interop.c index 14fd7f223..f1b366e50 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -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; }