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)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 20:15:32 +0000 (21:15 +0100)
commitd9eb6d6680c4baccaced3668f8b0c7fc19246fd1
tree2d9211e53e7dcfd12a9e4ca8a71bac1992298ce9
parent580ffd612348975cf3390ba5b3603c99046c848a
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.
src/mux_h2.c