Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
3218:022a7662b4ed | 3219:81b8416054b0 |
---|---|
1702 | 1702 |
1703 sn = r->virtual_names->regex; | 1703 sn = r->virtual_names->regex; |
1704 | 1704 |
1705 for (i = 0; i < r->virtual_names->nregex; i++) { | 1705 for (i = 0; i < r->virtual_names->nregex; i++) { |
1706 | 1706 |
1707 if (sn[i].captures && r->captures == NULL) { | 1707 if (sn[i].core_srv_conf->captures && r->captures == NULL) { |
1708 | 1708 |
1709 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3; | 1709 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3; |
1710 | 1710 |
1711 r->captures = ngx_palloc(r->pool, ncaptures * sizeof(int)); | 1711 r->captures = ngx_palloc(r->pool, ncaptures * sizeof(int)); |
1712 if (r->captures == NULL) { | 1712 if (r->captures == NULL) { |