diff src/http/ngx_http_request.c @ 3219:81b8416054b0

fix r3218: Initially building lists of ports, addresses, and server names had been placed at final configuration stage, because complete set of the "listen"s and the "server_names" were required for this operation. r3218 broke it, because the "listen"s go usually first in configuration, and cscf->server_names is empty at this stage, therefore no virtual names were configured. Now server configurations are stored in array for each address:port to configure virtual names. Also regex captures flag is moved from server names to core server configuration.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Oct 2009 16:27:48 +0000
parents 79ae445ec57b
children c8de5a8b6d17
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1704,7 +1704,7 @@ ngx_http_find_virtual_server(ngx_http_re
 
         for (i = 0; i < r->virtual_names->nregex; i++) {
 
-            if (sn[i].captures && r->captures == NULL) {
+            if (sn[i].core_srv_conf->captures && r->captures == NULL) {
 
                 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3;