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;
    }
This commit is contained in:
Damien Tournoud 2015-01-21 00:26:32 +01:00
parent 2bae4205ab
commit 59969c22ce

View 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;
}