changeset 5971:ebdb2023e84a

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; }
author Damien Tournoud <damien@commerceguys.com>
date Wed, 21 Jan 2015 00:26:32 +0100
parents 74edc0ccf27a
children 860a1c37f3b2
files src/http/ngx_http_core_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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_r
             continue;
         }
 
-        if (of.is_dir && !test_dir) {
+        if (of.is_dir != test_dir) {
             continue;
         }