]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: promex: Don't forget to consume the request on error
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 07:53:23 +0000 (08:53 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 08:45:23 +0000 (09:45 +0100)
When the promex applet triggers an error, for instance because the URI is
invalid, we must still take care to consume the request. Otherwise, the
error will be handled by HTTP analyzers as a server abort.

This patch must be backported as far as 2.0.

addons/promex/service-prometheus.c

index 4fee8c353f2ba931536a8f089aec4b273e6c0396..724d24b283407da52ab870fed485c82ffc2b3e20 100644 (file)
@@ -1617,6 +1617,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
        res->flags |= CF_READ_EVENT;
        sc_shutr(sc);
        sc_shutw(sc);
+       goto out;
 }
 
 struct applet promex_applet = {