mirror of https://github.com/omar-polo/gmid.git
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!
This commit is contained in:
parent
c9ea70a36f
commit
da834b5803
6
server.c
6
server.c
|
@ -249,7 +249,6 @@ struct location *
|
||||||
vhost_fastcgi(struct vhost *v, const char *path)
|
vhost_fastcgi(struct vhost *v, const char *path)
|
||||||
{
|
{
|
||||||
struct location *loc;
|
struct location *loc;
|
||||||
int force_disable = 0;
|
|
||||||
|
|
||||||
if (v == NULL || path == NULL)
|
if (v == NULL || path == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -260,12 +259,9 @@ vhost_fastcgi(struct vhost *v, const char *path)
|
||||||
if (matches(loc->match, path))
|
if (matches(loc->match, path))
|
||||||
return loc;
|
return loc;
|
||||||
if (loc->nofcgi && matches(loc->match, path))
|
if (loc->nofcgi && matches(loc->match, path))
|
||||||
force_disable = 1;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force_disable)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
loc = TAILQ_FIRST(&v->locations);
|
loc = TAILQ_FIRST(&v->locations);
|
||||||
return loc->fcgi == -1 ? NULL : loc;
|
return loc->fcgi == -1 ? NULL : loc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue