mirror of
https://github.com/nginx/nginx.git
synced 2025-07-28 16:46:16 +08:00
Fixed try_files with empty argument (ticket #390).
This commit is contained in:
parent
6db33c712b
commit
b5656b31f1
@ -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];
|
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].test_dir = 1;
|
||||||
tf[i].name.len--;
|
tf[i].name.len--;
|
||||||
tf[i].name.data[tf[i].name.len] = '\0';
|
tf[i].name.data[tf[i].name.len] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user