Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.h @ 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 | 022a7662b4ed |
children | cdcd9e29c589 |
comparison
equal
deleted
inserted
replaced
3218:022a7662b4ed | 3219:81b8416054b0 |
---|---|
166 | 166 |
167 ngx_flag_t ignore_invalid_headers; | 167 ngx_flag_t ignore_invalid_headers; |
168 ngx_flag_t merge_slashes; | 168 ngx_flag_t merge_slashes; |
169 ngx_flag_t underscores_in_headers; | 169 ngx_flag_t underscores_in_headers; |
170 | 170 |
171 ngx_uint_t listen; /* unsigned listen:1; */ | 171 unsigned listen:1; |
172 #if (NGX_PCRE) | |
173 unsigned captures:1; | |
174 #endif | |
172 | 175 |
173 ngx_http_core_loc_conf_t **named_locations; | 176 ngx_http_core_loc_conf_t **named_locations; |
174 } ngx_http_core_srv_conf_t; | 177 } ngx_http_core_srv_conf_t; |
175 | 178 |
176 | 179 |
225 | 228 |
226 ngx_hash_t hash; | 229 ngx_hash_t hash; |
227 ngx_hash_wildcard_t *wc_head; | 230 ngx_hash_wildcard_t *wc_head; |
228 ngx_hash_wildcard_t *wc_tail; | 231 ngx_hash_wildcard_t *wc_tail; |
229 | 232 |
230 ngx_array_t names; /* array of ngx_http_server_name_t */ | |
231 | |
232 #if (NGX_PCRE) | 233 #if (NGX_PCRE) |
233 ngx_uint_t nregex; | 234 ngx_uint_t nregex; |
234 ngx_http_server_name_t *regex; | 235 ngx_http_server_name_t *regex; |
235 #endif | 236 #endif |
236 | 237 |
237 /* the default server configuration for this address:port */ | 238 /* the default server configuration for this address:port */ |
238 ngx_http_core_srv_conf_t *core_srv_conf; | 239 ngx_http_core_srv_conf_t *core_srv_conf; |
240 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ | |
239 | 241 |
240 ngx_http_listen_opt_t opt; | 242 ngx_http_listen_opt_t opt; |
241 } ngx_http_conf_addr_t; | 243 } ngx_http_conf_addr_t; |
242 | 244 |
243 | 245 |
244 struct ngx_http_server_name_s { | 246 struct ngx_http_server_name_s { |
245 #if (NGX_PCRE) | 247 #if (NGX_PCRE) |
246 ngx_regex_t *regex; | 248 ngx_regex_t *regex; |
247 ngx_uint_t captures; /* unsigned captures:1; */ | |
248 #endif | 249 #endif |
249 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ | 250 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ |
250 ngx_str_t name; | 251 ngx_str_t name; |
251 }; | 252 }; |
252 | 253 |