Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 5416:ddf740b9fdf6 stable-1.4
Fixed try_files with empty argument (ticket #390).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 23 Aug 2013 22:18:39 +0400 |
parents | 4bcd35e7a0f0 |
children |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Tue Jul 30 11:43:21 2013 +0400 +++ b/src/http/ngx_http_core_module.c Fri Aug 23 22:18:39 2013 +0400 @@ -4758,7 +4758,9 @@ tf[i].name = value[i + 1]; - if (tf[i].name.data[tf[i].name.len - 1] == '/') { + if (tf[i].name.len > 0 + && 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';