]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: Don't send an emtpy H3 DATA frame during zero-copy forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 4 Jun 2024 17:01:18 +0000 (19:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Jun 2024 05:28:10 +0000 (07:28 +0200)
It may only happens when there is no data to forward but a last stream frame
must be sent with the FIN bit. It is not invalid, but it is useless to send
an empty H3 DATA frame in that case.

src/mux_quic.c

index 8272b93da76b95bcae845fd6f01a8b90acde7e28..97cfb27ce0ba2835fff088a7cb488cfd54cb800d 100644 (file)
@@ -3058,7 +3058,8 @@ static size_t qmux_strm_done_ff(struct stconn *sc)
                goto end;
        }
 
-       data += sd->iobuf.offset;
+       if (data)
+               data += sd->iobuf.offset;
        total = qcs->qcc->app_ops->done_ff(qcs);
 
        if (data || qcs->flags & QC_SF_FIN_STREAM)