comparison src/http/modules/ngx_http_grpc_module.c @ 7321:45e513c3540d

Fixed invalid access to location defined as an empty string.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 17 Jul 2018 15:30:43 +0300
parents 696df3ac27ac
children f6047a579ca1
comparison
equal deleted inserted replaced
7320:696df3ac27ac 7321:45e513c3540d
4523 4523
4524 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); 4524 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
4525 4525
4526 clcf->handler = ngx_http_grpc_handler; 4526 clcf->handler = ngx_http_grpc_handler;
4527 4527
4528 if (clcf->name.data[clcf->name.len - 1] == '/') { 4528 if (clcf->name.len && clcf->name.data[clcf->name.len - 1] == '/') {
4529 clcf->auto_redirect = 1; 4529 clcf->auto_redirect = 1;
4530 } 4530 }
4531 4531
4532 return NGX_CONF_OK; 4532 return NGX_CONF_OK;
4533 } 4533 }