From c2378f80289ead8157c63ac6216836bab6e4294b Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 7 Nov 2007 13:39:53 +0000 Subject: r1254, r1416, r1493 merge: the "www.example.*" wildcard hash support --- src/http/ngx_http_request.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index c60f2e55d..bc7a92fcc 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1463,19 +1463,10 @@ ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len, vn = r->virtual_names; - if (vn->hash.buckets) { - cscf = ngx_hash_find(&vn->hash, hash, host, len); - if (cscf) { - goto found; - } - } + cscf = ngx_hash_find_combined(vn, hash, host, len); - if (vn->dns_wildcards && vn->dns_wildcards->hash.buckets) { - cscf = ngx_hash_find_wildcard(vn->dns_wildcards, host, len); - - if (cscf) { - goto found; - } + if (cscf) { + goto found; } cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); -- cgit