]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Fix error handling when H1S allocation failed on client side
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Nov 2022 14:54:12 +0000 (15:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Nov 2022 14:54:13 +0000 (15:54 +0100)
The goto label is not at the right place. When H1S allocation failed, the
error is immediately handled. Thus, "no_parsing" label must be set just
after h1_send() call to skip the request parsing part.

It is 2-7-specific. No backport needed.

src/mux_h1.c

index 36a55f976527cf86316dcf89f8371e51990352f2..1ab6758acf6494ba80cd00e90727cc72abb177f3 100644 (file)
@@ -2981,7 +2981,6 @@ static int h1_process(struct h1c * h1c)
                h1_release_buf(h1c, &h1s->rxbuf);
                h1_set_idle_expiration(h1c);
 
-         no_parsing:
                if (h1s->flags & H1S_F_INTERNAL_ERROR) {
                        h1_handle_internal_err(h1c);
                        h1c->flags &= ~H1C_F_WAIT_NEXT_REQ;
@@ -3003,6 +3002,7 @@ static int h1_process(struct h1c * h1c)
                }
        }
 
+  no_parsing:
        h1_send(h1c);
 
        /* H1 connection must be released ASAP if: