diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-03-19 19:07:40 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-03-19 19:07:40 +0300 |
commit | 7b5edd8ffed2a8855bcdced02e7379eac0396ab8 (patch) | |
tree | 675269bfe8a9d1b99e349b9cc8335b667013a23a /src/http/ngx_http.c | |
parent | e231e583678d8c814885e1bd378b1a248044bc44 (diff) |
always run regex in server_name to get captures
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index dd33169da..2e7018003 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1395,7 +1395,12 @@ ngx_http_optimize_servers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf, name = addr[a].names.elts; for (s = 0; s < addr[a].names.nelts; s++) { - if (addr[a].core_srv_conf == name[s].core_srv_conf) { + if (addr[a].core_srv_conf == name[s].core_srv_conf +#if (NGX_PCRE) + && name[s].captures == 0 +#endif + ) + { continue; } @@ -1806,7 +1811,11 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_http_port_t *hport, && (addr[i].wc_head == NULL || addr[i].wc_head->hash.buckets == NULL) && (addr[i].wc_tail == NULL - || addr[i].wc_tail->hash.buckets == NULL)) + || addr[i].wc_tail->hash.buckets == NULL) +#if (NGX_PCRE) + && addr[i].nregex == 0 +#endif + ) { continue; } |