]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: fcgi-app: "use-fcgi-app" requires TCP or HTTP mode
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 19 Sep 2023 16:28:44 +0000 (18:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:30 +0000 (15:34 +0200)
Prevent the use of the "use-fcgi-app" keyword in proxy sections where
neither TCP nor HTTP mode is set.

src/fcgi-app.c

index 829d1b128b394d242b987ea9b379704134589074..148ab5e2227c1d59f6edd7feaab864241e7a47b6 100644 (file)
@@ -591,6 +591,12 @@ static int proxy_parse_use_fcgi_app(char **args, int section, struct proxy *curp
                goto end;
         }
 
+       if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
+               memprintf(err, "'%s' requires TCP or HTTP mode", args[0]);
+               retval = -1;
+               goto end;
+        }
+
        if (!*(args[1])) {
                memprintf(err, "'%s' expects <name> as argument", args[0]);
                retval = -1;