]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: set expect data only on frontend side
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Jun 2025 14:37:11 +0000 (16:37 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 12 Jun 2025 09:28:54 +0000 (11:28 +0200)
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.

src/mux_quic.c

index 2d2720d683ca94ac3392931b9fd5d4690db34b9c..046627e24cd6036590f073044e041555965c23e8 100644 (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. */