mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 01:42:58 +08:00
Fixed try_files with empty argument (ticket #390).
This commit is contained in:
parent
a01f0078ed
commit
0f49681f28
@ -4766,7 +4766,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 New Issue
Block a user