From: Damien Tournoud Date: Tue, 20 Jan 2015 23:26:32 +0000 (+0100) Subject: Fixed try_files directory test to match only a directory. X-Git-Tag: release-1.7.10~3 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=59969c22ce287c951eb759792bf0df5d01f94aae;p=nginx.git 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; } --- 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; }