comparison src/http/ngx_http_core_module.h @ 5085:7f1cbcc71327

The default server lookup is now done only once per connection. Previously, it was done for every request in a connection.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 27 Feb 2013 16:53:01 +0000
parents f7fe817c92a2
children c0f7b94e88ba
comparison
equal deleted inserted replaced
5084:f7fe817c92a2 5085:7f1cbcc71327
207 207
208 /* list of structures to find core_srv_conf quickly at run time */ 208 /* list of structures to find core_srv_conf quickly at run time */
209 209
210 210
211 typedef struct { 211 typedef struct {
212 #if (NGX_PCRE)
213 ngx_http_regex_t *regex;
214 #endif
215 ngx_http_core_srv_conf_t *server; /* virtual name server conf */
216 ngx_str_t name;
217 } ngx_http_server_name_t;
218
219
220 typedef struct {
221 ngx_hash_combined_t names;
222
223 ngx_uint_t nregex;
224 ngx_http_server_name_t *regex;
225 } ngx_http_virtual_names_t;
226
227
228 struct ngx_http_addr_conf_s {
212 /* the default server configuration for this address:port */ 229 /* the default server configuration for this address:port */
213 ngx_http_core_srv_conf_t *default_server; 230 ngx_http_core_srv_conf_t *default_server;
214 231
215 ngx_http_virtual_names_t *virtual_names; 232 ngx_http_virtual_names_t *virtual_names;
216 233
217 #if (NGX_HTTP_SSL) 234 #if (NGX_HTTP_SSL)
218 ngx_uint_t ssl; /* unsigned ssl:1; */ 235 ngx_uint_t ssl; /* unsigned ssl:1; */
219 #endif 236 #endif
220 } ngx_http_addr_conf_t; 237 };
221 238
222 239
223 typedef struct { 240 typedef struct {
224 in_addr_t addr; 241 in_addr_t addr;
225 ngx_http_addr_conf_t conf; 242 ngx_http_addr_conf_t conf;
264 281
265 /* the default server configuration for this address:port */ 282 /* the default server configuration for this address:port */
266 ngx_http_core_srv_conf_t *default_server; 283 ngx_http_core_srv_conf_t *default_server;
267 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ 284 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
268 } ngx_http_conf_addr_t; 285 } ngx_http_conf_addr_t;
269
270
271 struct ngx_http_server_name_s {
272 #if (NGX_PCRE)
273 ngx_http_regex_t *regex;
274 #endif
275 ngx_http_core_srv_conf_t *server; /* virtual name server conf */
276 ngx_str_t name;
277 };
278 286
279 287
280 typedef struct { 288 typedef struct {
281 ngx_int_t status; 289 ngx_int_t status;
282 ngx_int_t overwrite; 290 ngx_int_t overwrite;