From a69cf2d005111f785de5ad3362ba6c616a7aef5d Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 29 Jul 2010 10:00:04 +0000 Subject: use an empty name as default server_name instread of hostname --- src/http/ngx_http_core_module.c | 5 ++--- 1 file 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; -- cgit