mirror of
https://github.com/nginx/nginx.git
synced 2024-12-22 23:23:32 -06:00
allow server_name "" as the first name
This commit is contained in:
parent
6b45b065fe
commit
e8cf60da34
@ -3609,7 +3609,6 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
ch = value[1].data[0];
|
||||
|
||||
if (cscf->server_name.data == NULL) {
|
||||
if (value[1].len) {
|
||||
name = value[1];
|
||||
|
||||
if (ch == '.') {
|
||||
@ -3622,12 +3621,6 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
if (cscf->server_name.data == NULL) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
} else {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"the first server name must not be empty");
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < cf->args->nelts; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user