# HG changeset patch # User Igor Sysoev # Date 1237567643 0 # Node ID 91e287d78d904a4ec3c3d262ff6c5d11701b1042 # Parent 1fb5e7e05a4eb28bf7ac622f6b671e6043f4a686 fix directory test in try_files 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 @@ -3956,6 +3956,7 @@ ngx_http_core_try_files(ngx_conf_t *cf, 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);