aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDamien Tournoud <damien@commerceguys.com>2015-01-21 00:26:32 +0100
committerDamien Tournoud <damien@commerceguys.com>2015-01-21 00:26:32 +0100
commit59969c22ce287c951eb759792bf0df5d01f94aae (patch)
tree9ce8fbaacefd1ef83f16feeb8b1aa0ca665d2588 /src
parent2bae4205abd1583a5f3e2dfdc3174c1ef0c3828d (diff)
downloadnginx-59969c22ce287c951eb759792bf0df5d01f94aae.tar.gz
nginx-59969c22ce287c951eb759792bf0df5d01f94aae.zip
Fixed try_files directory test to match only a directory.
Historically, it was possible to match either a file or directory in the following configuration: location / { try_files $uri/ =404; }
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index d8ff53bfe..0542b2871 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1353,7 +1353,7 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
continue;
}
- if (of.is_dir && !test_dir) {
+ if (of.is_dir != test_dir) {
continue;
}