diff src/http/ngx_http_core_module.c @ 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 c76d851c5e7a
children 2dac6ae6d703
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;
         }