From: Amaury Denoyelle Date: Tue, 10 Jun 2025 14:37:11 +0000 (+0200) Subject: MINOR: mux-quic: set expect data only on frontend side X-Git-Tag: v3.3-dev2~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8d096c05f65b86fcbc930f4249df0f1e3066433;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: set expect data only on frontend side Stream data layer is notified that data is expected when FIN is received, which marks the end of the HTTP request. This prepares data layer to be able to handle the expected HTTP response. Thus, this step is only relevant on frontend side. On backend side, FIN marks the end of the HTTP response. No further content is expected, thus expect data should not be set in this case. Note that se_expect_data() invokation via qcs_attach_sc() is not protected. This is because this function will only be called during request headers parsing which is performed on the frontend side. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 2d2720d68..046627e24 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3656,10 +3656,12 @@ static size_t qmux_strm_rcv_buf(struct stconn *sc, struct buffer *buf, TRACE_STATE("report end-of-input", QMUX_EV_STRM_RECV, qcc->conn, qcs); se_fl_set(qcs->sd, SE_FL_EOI); - /* If request EOM is reported to the upper layer, it means the - * QCS now expects data from the opposite side. - */ - se_expect_data(qcs->sd); + if (!(qcc->flags & QC_CF_IS_BACK)) { + /* If request EOM is reported to the upper layer, it means the + * QCS now expects data from the opposite side. + */ + se_expect_data(qcs->sd); + } } /* Set end-of-stream on read closed. */