diff src/http/ngx_http_request.c @ 1253:8ef04207c84f

the "www.example.*" wildcard hash support
author Igor Sysoev <igor@sysoev.ru>
date Mon, 11 Jun 2007 19:49:22 +0000
parents 754f3648642d
children a3f8d6d17b94
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1459,19 +1459,10 @@ ngx_http_find_virtual_server(ngx_http_re
 
     vn = r->virtual_names;
 
-    if (vn->hash.buckets) {
-        cscf = ngx_hash_find(&vn->hash, hash, host, len);
-        if (cscf) {
-            goto found;
-        }
-    }
-
-    if (vn->dns_wildcards && vn->dns_wildcards->hash.buckets) {
-        cscf = ngx_hash_find_wildcard(vn->dns_wildcards, host, len);
-
-        if (cscf) {
-            goto found;
-        }
+    cscf = ngx_hash_find_combined(vn, hash, host, len);
+
+    if (cscf) {
+        goto found;
     }
 
     cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);