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.
This commit is contained in:
Amaury Denoyelle 2025-06-10 16:37:11 +02:00
parent e8775d51df
commit f8d096c05f

View File

@ -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. */