Fixed try_files with empty argument (ticket #390).
This commit is contained in:
parent
bbbe730163
commit
c7f3d6d3d6
1 changed files with 3 additions and 1 deletions
|
@ -4758,7 +4758,9 @@ ngx_http_core_try_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
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';
|
||||
|
|
Loading…
Reference in a new issue