diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-07-29 10:00:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-07-29 10:00:04 +0000 |
commit | a69cf2d005111f785de5ad3362ba6c616a7aef5d (patch) | |
tree | 08e4e62bd7c9448f5de0165596bdc5ad355635a6 /src | |
parent | e8cf60da349b8741403b1413cc4622372f091050 (diff) | |
download | nginx-a69cf2d005111f785de5ad3362ba6c616a7aef5d.tar.gz nginx-a69cf2d005111f785de5ad3362ba6c616a7aef5d.zip |
use an empty name as default server_name instread of hostname
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_core_module.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 8f1ab0841..f4d0aae04 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3011,7 +3011,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) } if (conf->server_name.data == NULL) { - conf->server_name = cf->cycle->hostname; + ngx_str_set(&conf->server_name, ""); sn = ngx_array_push(&conf->server_names); if (sn == NULL) { @@ -3022,8 +3022,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) sn->regex = NULL; #endif sn->server = conf; - sn->name.len = conf->server_name.len; - sn->name.data = conf->server_name.data; + ngx_str_set(&sn->name, ""); } return NGX_CONF_OK; |