diff --git a/src/h3.c b/src/h3.c index 50e6b4f81..59e57c2bf 100644 --- a/src/h3.c +++ b/src/h3.c @@ -680,7 +680,7 @@ static ssize_t h3_headers_to_htx(struct qcs *qcs, const struct buffer *buf, htx_to_buf(htx, &htx_buf); htx = NULL; - if (!qc_attach_sc(qcs, &htx_buf)) { + if (!qc_attach_sc(qcs, &htx_buf, fin)) { h3c->err = H3_INTERNAL_ERROR; len = -1; goto out; diff --git a/src/hq_interop.c b/src/hq_interop.c index cbbf47288..f34657854 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -88,7 +88,7 @@ static ssize_t hq_interop_decode_qcs(struct qcs *qcs, struct buffer *b, int fin) htx_add_endof(htx, HTX_BLK_EOH); htx_to_buf(htx, &htx_buf); - if (!qc_attach_sc(qcs, &htx_buf)) + if (!qc_attach_sc(qcs, &htx_buf, fin)) return -1; b_free(&htx_buf); diff --git a/src/mux_quic.c b/src/mux_quic.c index 3cc24108d..c4b695754 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -639,7 +639,7 @@ static struct qcs *qcc_init_stream_remote(struct qcc *qcc, uint64_t id) return NULL; } -struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf) +struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf, char fin) { struct qcc *qcc = qcs->qcc; struct session *sess = qcc->conn->owner; @@ -679,6 +679,11 @@ struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf) BUG_ON_HOT(!LIST_INLIST(&qcs->el_opening)); LIST_DEL_INIT(&qcs->el_opening); + if (fin) { + TRACE_STATE("report end-of-input", QMUX_EV_STRM_RECV, qcc->conn, qcs); + se_fl_set(qcs->sd, SE_FL_EOI); + } + return qcs->sd->sc; } @@ -2717,7 +2722,7 @@ static size_t qc_recv_buf(struct stconn *sc, struct buffer *buf, else { se_fl_clr(qcs->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); - /* Set end-of-input if FIN received and all data extracted. */ + /* Set end-of-input when full message properly received. */ if (fin) { TRACE_STATE("report end-of-input", QMUX_EV_STRM_RECV, qcc->conn, qcs); se_fl_set(qcs->sd, SE_FL_EOI);