]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2: remove a misleading and impossible test
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Jan 2019 10:41:50 +0000 (11:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Jan 2019 17:45:38 +0000 (18:45 +0100)
In h2c_frt_handle_headers(), we test the stream for SS_ERROR just after
setting it to SS_OPEN, this makes no sense and creates confusion in the
error path. Remove this misleading test.

src/mux_h2.c

index 3f8ae0d6c1737371ad91d53fe5132cfcd91fb8d8..d74d51481806f760b6c9079556ef3e9289f35014 100644 (file)
@@ -1917,15 +1917,9 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
                h2s->cs->flags |= CS_FL_REOS;
        }
 
-       if (h2s->st >= H2_SS_ERROR) {
-               /* stream error : send RST_STREAM */
-               h2c->st0 = H2_CS_FRAME_E;
-       }
-       else {
-               /* update the max stream ID if the request is being processed */
-               if (h2s->id > h2c->max_id)
-                       h2c->max_id = h2s->id;
-       }
+       /* update the max stream ID if the request is being processed */
+       if (h2s->id > h2c->max_id)
+               h2c->max_id = h2s->id;
 
        return h2s;