Mercurial > hg > nginx
comparison src/http/ngx_http.c @ 2583:1fb5e7e05a4e
always run regex in server_name to get captures
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 19 Mar 2009 16:07:40 +0000 |
parents | 684ca3b0ae14 |
children | 9bcda0da8d36 |
comparison
equal
deleted
inserted
replaced
2582:2068bdecc876 | 2583:1fb5e7e05a4e |
---|---|
1393 for (a = 0; a < port[p].addrs.nelts; a++) { | 1393 for (a = 0; a < port[p].addrs.nelts; a++) { |
1394 | 1394 |
1395 name = addr[a].names.elts; | 1395 name = addr[a].names.elts; |
1396 for (s = 0; s < addr[a].names.nelts; s++) { | 1396 for (s = 0; s < addr[a].names.nelts; s++) { |
1397 | 1397 |
1398 if (addr[a].core_srv_conf == name[s].core_srv_conf) { | 1398 if (addr[a].core_srv_conf == name[s].core_srv_conf |
1399 #if (NGX_PCRE) | |
1400 && name[s].captures == 0 | |
1401 #endif | |
1402 ) | |
1403 { | |
1399 continue; | 1404 continue; |
1400 } | 1405 } |
1401 | 1406 |
1402 if (ngx_http_server_names(cf, cmcf, &addr[a]) != NGX_OK) { | 1407 if (ngx_http_server_names(cf, cmcf, &addr[a]) != NGX_OK) { |
1403 return NGX_ERROR; | 1408 return NGX_ERROR; |
1804 | 1809 |
1805 if (addr[i].hash.buckets == NULL | 1810 if (addr[i].hash.buckets == NULL |
1806 && (addr[i].wc_head == NULL | 1811 && (addr[i].wc_head == NULL |
1807 || addr[i].wc_head->hash.buckets == NULL) | 1812 || addr[i].wc_head->hash.buckets == NULL) |
1808 && (addr[i].wc_tail == NULL | 1813 && (addr[i].wc_tail == NULL |
1809 || addr[i].wc_tail->hash.buckets == NULL)) | 1814 || addr[i].wc_tail->hash.buckets == NULL) |
1815 #if (NGX_PCRE) | |
1816 && addr[i].nregex == 0 | |
1817 #endif | |
1818 ) | |
1810 { | 1819 { |
1811 continue; | 1820 continue; |
1812 } | 1821 } |
1813 | 1822 |
1814 vn = ngx_palloc(cf->pool, sizeof(ngx_http_virtual_names_t)); | 1823 vn = ngx_palloc(cf->pool, sizeof(ngx_http_virtual_names_t)); |