Fixed invalid access to location defined as an empty string.
This commit is contained in:
parent
bc8843e64d
commit
425a296769
6 changed files with 6 additions and 6 deletions
|
@ -3501,7 +3501,7 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
clcf->handler = ngx_http_fastcgi_handler;
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -4525,7 +4525,7 @@ ngx_http_grpc_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
clcf->handler = ngx_http_grpc_handler;
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
clcf->handler = ngx_http_memcached_handler;
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -3580,7 +3580,7 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
clcf->handler = ngx_http_proxy_handler;
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1857,7 +1857,7 @@ ngx_http_scgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2144,7 +2144,7 @@ ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
if (clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
|
||||
clcf->auto_redirect = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue