# HG changeset patch # User Damien Tournoud # Date 1421796392 -3600 # Node ID ebdb2023e84af9e2e9f5d826e5cfed5ee1b7e425 # Parent 74edc0ccf27a708212c816ae92a2bb16cde4aa12 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 --- 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; }