]> git.kaiwu.me - nginx.git/commitdiff
Fixed try_files directory test to match only a directory.
authorDamien Tournoud <damien@commerceguys.com>
Tue, 20 Jan 2015 23:26:32 +0000 (00:26 +0100)
committerDamien Tournoud <damien@commerceguys.com>
Tue, 20 Jan 2015 23:26:32 +0000 (00:26 +0100)
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

index d8ff53bfe6f5d43a2a3dc222d510d9d8d3288103..0542b2871211fc6cfe111e8a568c3435e7be06f1 100644 (file)
@@ -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;
         }