Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 3219:81b8416054b0
fix r3218:
Initially building lists of ports, addresses, and server names had been
placed at final configuration stage, because complete set of the "listen"s
and the "server_names" were required for this operation. r3218 broke it,
because the "listen"s go usually first in configuration, and
cscf->server_names is empty at this stage, therefore no virtual names
were configured.
Now server configurations are stored in array for each address:port
to configure virtual names. Also regex captures flag is moved from
server names to core server configuration.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Oct 2009 16:27:48 +0000 |
parents | a22bf524a456 |
children | cdcd9e29c589 |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Wed Oct 21 08:48:04 2009 +0000 +++ b/src/http/ngx_http_core_module.c Wed Oct 21 16:27:48 2009 +0000 @@ -2876,7 +2876,6 @@ #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 @@ #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 @@ 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,