diff options
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index a9e9495f0..a8c33f1c5 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2876,7 +2876,6 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) #if (NGX_PCRE) sn->regex = NULL; - sn->captures = 0; #endif sn->core_srv_conf = conf; sn->name.len = conf->server_name.len; @@ -3529,11 +3528,12 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) #if (NGX_PCRE) sn->regex = NULL; - sn->captures = 0; #endif sn->core_srv_conf = cscf; sn->name = value[i]; + ngx_strlow(sn->name.data, sn->name.data, sn->name.len); + if (value[i].data[0] != '~') { continue; } @@ -3562,8 +3562,8 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - sn->captures = (ngx_regex_capture_count(sn->regex) > 0); sn->name = value[i]; + cscf->captures = (ngx_regex_capture_count(sn->regex) > 0); } #else ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |