mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
Fixed invalid access to location defined as an empty string.
This commit is contained in:
parent
d5a27006e0
commit
372b624627
@ -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 New Issue
Block a user