From 59969c22ce287c951eb759792bf0df5d01f94aae Mon Sep 17 00:00:00 2001 From: Damien Tournoud Date: Wed, 21 Jan 2015 00:26:32 +0100 Subject: [PATCH] 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; } --- src/http/ngx_http_core_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }