Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 2549:2d34fba7cf06
captures support in server_name
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 06 Mar 2009 12:50:20 +0000 |
parents | 163114282d2c |
children | 8ec97ff12a0a |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2819,6 +2819,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t #if (NGX_PCRE) sn->regex = NULL; + sn->captures = 0; #endif sn->core_srv_conf = conf; sn->name.len = conf->server_name.len; @@ -3420,6 +3421,7 @@ ngx_http_core_server_name(ngx_conf_t *cf #if (NGX_PCRE) sn->regex = NULL; + sn->captures = 0; #endif sn->core_srv_conf = cscf; sn->name = value[i]; @@ -3446,6 +3448,7 @@ ngx_http_core_server_name(ngx_conf_t *cf return NGX_CONF_ERROR; } + sn->captures = (ngx_regex_capture_count(sn->regex) > 0); sn->name = value[i]; } #else