]> git.kaiwu.me - nginx.git/commitdiff
fix directory test in try_files
authorIgor Sysoev <igor@sysoev.ru>
Fri, 20 Mar 2009 16:47:23 +0000 (16:47 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 20 Mar 2009 16:47:23 +0000 (16:47 +0000)
src/http/ngx_http_core_module.c

index beb0666920b25d1d488687ecc20835be594c2c6e..4350ab157fde4868ac9a1033c63f82f3d438a3e5 100644 (file)
@@ -3956,6 +3956,7 @@ ngx_http_core_try_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         if (tf[i].name.data[tf[i].name.len - 1] == '/') {
             tf[i].test_dir = 1;
             tf[i].name.len--;
+            tf[i].name.data[tf[i].name.len] = '\0';
         }
 
         n = ngx_http_script_variables_count(&tf[i].name);