BUG/MEDIUM: mux-quic: only set EOI on FIN
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 25 May 2023 13:02:24 +0000 (15:02 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 26 May 2023 15:17:25 +0000 (17:17 +0200)
commitbfddb42c05ee67488b54a564ede651c378a0037f
treededce49fa6abc45d5d5cc725d8497e2b2a5bdda0
parent6d6ee0dc0b9fb11a41a12256b11c4048e114331a
BUG/MEDIUM: mux-quic: only set EOI on FIN

Recently stconn flags were reviewed for QUIC mux to be conform with
other HTTP muxes. However, a mistake was made when dealing with a proper
stream FIN with both EOI and EOS set. This was done as RESET_STREAM
received after a FIN are ignored by QUIC mux and thus there is no
difference between EOI or EOI+EOS. However, analyzers may interpret EOS
as an interrupted request which result in a 400 HTTP error code.

To fix this, only set EOI on proper stream FIN. EOS is set when input is
interrupted (RESET_STREAM before FIN) or a STOP_SENDING is received
which prevent transfer to complete. In this last case, EOS must be
manually set too if FIN has been received before STOP_SENDING to go
directly from ERR_PENDING to final ERROR state.

This must be backported up to 2.7.
src/mux_quic.c