BUG/MEDIUM: mux-h2: Don't report error on SE for closed H2 streams
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 17:24:49 +0000 (18:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Feb 2024 13:51:00 +0000 (14:51 +0100)
commit216861a8382578d00001461e7ca1da038d22e4cf
tree7bcd943c7b4af995cc258493ad2f469cce357c6a
parentba6a58f87bd7fe49db9f888b47f932b12ac6c4b0
BUG/MEDIUM: mux-h2: Don't report error on SE for closed H2 streams

An error on the H2 connection was always reported as an error to the
stream-endpoint descriptor, independently on the H2 stream state. But it is
a bug to do so for closed streams. And indeed, it leads to report "SD--"
termination state for some streams while the response was fully received and
forwarded to the client, at least for the backend side point of view.

Now, errors are no longer reported for H2 streams in closed state.

This patch is related to the three previous ones:

 * "BUG/MEDIUM: mux-h2: Don't report error on SE for closed H2 streams"
 * "BUG/MEDIUM: mux-h2: Don't report error on SE if error is only pending on H2C"
 * "BUG/MEDIUM: mux-h2: Only Report H2C error on read error if demux buffer is empty"

The series should fix a bug reported in issue #2388
(#2388#issuecomment-1855735144). The series should be backported to 2.9 but
only after a period of observation. In theory, older versions are also
affected but this part is pretty sensitive. So don't backport it further
except if someone ask for it.

(cherry picked from commit d9eb6d6680c4baccaced3668f8b0c7fc19246fd1)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/mux_h2.c