]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: Don't report error on SE if error is only pending on H2C
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 17:19:33 +0000 (18:19 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Dec 2023 20:15:32 +0000 (21:15 +0100)
In h2s_wake_one_stream(), we must not report an error on the stream-endpoint
descriptor if the error is not definitive on the H2 connection. A pending
error on the H2 connection means there are potentially remaining data to be
demux. It is important to not truncate a message for a stream.

This patch is part of a series that should fix a bug reported in issue #2388
(#2388#issuecomment-1855735144). Backport instructions will be shipped in
the last commit of the series.

src/mux_h2.c

index a0f5cd5545a4d769402711e5997a2c086eb0604b..d74a6bd130cc2e43d949b2ac8c1c37bb55489cba 100644 (file)
@@ -2178,7 +2178,7 @@ static void h2s_wake_one_stream(struct h2s *h2s)
                        h2s_close(h2s);
        }
 
-       if (h2s->h2c->st0 >= H2_CS_ERROR || (h2s->h2c->flags & (H2_CF_ERR_PENDING|H2_CF_ERROR)) ||
+       if (h2s->h2c->st0 >= H2_CS_ERROR || (h2s->h2c->flags & H2_CF_ERROR) ||
            (h2s->h2c->last_sid > 0 && (!h2s->id || h2s->id > h2s->h2c->last_sid))) {
                se_fl_set_error(h2s->sd);