comparison src/http/ngx_http.c @ 507:cd3117ad9aab release-0.1.28

nginx-0.1.28-RELEASE import *) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 08 Apr 2005 15:18:55 +0000
parents b1648294f693
children 9b8c906f6e63
comparison
equal deleted inserted replaced
506:005e65646622 507:cd3117ad9aab
88 #if (NGX_SUPPRESS_WARN) 88 #if (NGX_SUPPRESS_WARN)
89 /* MSVC thinks "in_ports" may be used without having been initialized */ 89 /* MSVC thinks "in_ports" may be used without having been initialized */
90 ngx_memzero(&in_ports, sizeof(ngx_array_t)); 90 ngx_memzero(&in_ports, sizeof(ngx_array_t));
91 #endif 91 #endif
92 92
93
94 /* the main http context */ 93 /* the main http context */
95 94
96 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)); 95 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
97 if (ctx == NULL) { 96 if (ctx == NULL) {
98 return NGX_CONF_ERROR; 97 return NGX_CONF_ERROR;
314 return NGX_CONF_ERROR; 313 return NGX_CONF_ERROR;
315 } 314 }
316 315
317 cmcf->phases[NGX_HTTP_CONTENT_PHASE].type = NGX_OK; 316 cmcf->phases[NGX_HTTP_CONTENT_PHASE].type = NGX_OK;
318 317
318
319 cmcf->headers_in_hash.max_size = 100;
320 cmcf->headers_in_hash.bucket_limit = 1;
321 cmcf->headers_in_hash.bucket_size = sizeof(ngx_http_header_t);
322 cmcf->headers_in_hash.name = "http headers_in";
323
324 if (ngx_hash_init(&cmcf->headers_in_hash, cf->pool, ngx_http_headers_in)
325 != NGX_OK)
326 {
327 return NGX_CONF_ERROR;
328 }
329
330 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0,
331 "http headers_in hash size: %ui, max buckets per entry: %ui",
332 cmcf->headers_in_hash.hash_size,
333 cmcf->headers_in_hash.min_buckets);
319 334
320 /* 335 /*
321 * create the lists of ports, addresses and server names 336 * create the lists of ports, addresses and server names
322 * to quickly find the server core module configuration at run-time 337 * to quickly find the server core module configuration at run-time
323 */ 338 */