From: Amaury Denoyelle Date: Wed, 28 Oct 2026 14:55:24 +0000 (+0100) Subject: MINOR: mux_quic: refactor qcs_http_handle_standalone_fin() X-Git-Tag: v3.5-dev12~29 X-Git-Url: https://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=14fa727d4435954bcf210482e1c40f366511c591;p=haproxy.git MINOR: mux_quic: refactor qcs_http_handle_standalone_fin() Add htx_to_buf() in err label for qcs_http_handle_standalone_fin(). The objective is to simplify modification of the function body for future fixes. This will be reused first to prevent a possible double EOT after HTTP/3 trailers parsing. --- diff --git a/src/qcm_http.c b/src/qcm_http.c index 497aba0ff..e7f469d1f 100644 --- a/src/qcm_http.c +++ b/src/qcm_http.c @@ -62,24 +62,27 @@ size_t qcs_http_rcv_buf(struct qcs *qcs, struct buffer *buf, size_t count, return ret; } +/* Add EOM flag on input buffer for instance. + * Returns 0 on success else non zero on internal error. + */ int qcs_http_handle_standalone_fin(struct qcs *qcs) { struct buffer *appbuf; - struct htx *htx; - int eom; + struct htx *htx = NULL; if (!(appbuf = qcc_get_stream_rxbuf(qcs))) goto err; - htx = htx_from_buf(appbuf); - eom = htx_set_eom(htx); - htx_to_buf(htx, appbuf); - if (!eom) + + if (!htx_set_eom(htx)) goto err; + htx_to_buf(htx, appbuf); return 0; err: + if (htx) + htx_to_buf(htx, appbuf); return -1; }