aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-03 16:14:09 +0000
committerOmar Polo <op@omarpolo.com>2024-06-03 16:14:09 +0000
commitda834b580366e17fc1a94f9fa9d1737448163717 (patch)
tree441a8b4f7091704068f191eade6d290404345cec /server.c
parentc9ea70a36f8f89b556b591e00fa872e5ac6945fc (diff)
fix `fastcgi off' handling
When a matching location has a `fastcgi off' directive, we should honour that and stop searching for further location which may have a `fastcgi' directive. Bug reported by Alex // nytpu, thanks!
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/server.c b/server.c
index 8e39912..ed78ad6 100644
--- a/server.c
+++ b/server.c
@@ -249,7 +249,6 @@ struct location *
vhost_fastcgi(struct vhost *v, const char *path)
{
struct location *loc;
- int force_disable = 0;
if (v == NULL || path == NULL)
return NULL;
@@ -260,12 +259,9 @@ vhost_fastcgi(struct vhost *v, const char *path)
if (matches(loc->match, path))
return loc;
if (loc->nofcgi && matches(loc->match, path))
- force_disable = 1;
+ return NULL;
}
- if (force_disable)
- return NULL;
-
loc = TAILQ_FIRST(&v->locations);
return loc->fcgi == -1 ? NULL : loc;
}