comparison 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
comparison
equal deleted inserted replaced
1252:132ffdecebfe 1253:8ef04207c84f
1457 ngx_http_core_loc_conf_t *clcf; 1457 ngx_http_core_loc_conf_t *clcf;
1458 ngx_http_core_srv_conf_t *cscf; 1458 ngx_http_core_srv_conf_t *cscf;
1459 1459
1460 vn = r->virtual_names; 1460 vn = r->virtual_names;
1461 1461
1462 if (vn->hash.buckets) { 1462 cscf = ngx_hash_find_combined(vn, hash, host, len);
1463 cscf = ngx_hash_find(&vn->hash, hash, host, len); 1463
1464 if (cscf) { 1464 if (cscf) {
1465 goto found; 1465 goto found;
1466 }
1467 }
1468
1469 if (vn->dns_wildcards && vn->dns_wildcards->hash.buckets) {
1470 cscf = ngx_hash_find_wildcard(vn->dns_wildcards, host, len);
1471
1472 if (cscf) {
1473 goto found;
1474 }
1475 } 1466 }
1476 1467
1477 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); 1468 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
1478 1469
1479 if (cscf->wildcard) { 1470 if (cscf->wildcard) {