diff src/http/ngx_http.c @ 56:3050baa54a26 NGINX_0_1_28

nginx 0.1.28 *) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author Igor Sysoev <http://sysoev.ru>
date Fri, 08 Apr 2005 00:00:00 +0400
parents 0d75d65c642f
children b55cbf18157e
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -90,7 +90,6 @@ ngx_http_block(ngx_conf_t *cf, ngx_comma
     ngx_memzero(&in_ports, sizeof(ngx_array_t));
 #endif
 
-
     /* the main http context */
 
     ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
@@ -317,6 +316,22 @@ ngx_http_block(ngx_conf_t *cf, ngx_comma
     cmcf->phases[NGX_HTTP_CONTENT_PHASE].type = NGX_OK;
 
 
+    cmcf->headers_in_hash.max_size = 100;
+    cmcf->headers_in_hash.bucket_limit = 1;
+    cmcf->headers_in_hash.bucket_size = sizeof(ngx_http_header_t);
+    cmcf->headers_in_hash.name = "http headers_in";
+
+    if (ngx_hash_init(&cmcf->headers_in_hash, cf->pool, ngx_http_headers_in)
+        != NGX_OK)
+    {
+        return NGX_CONF_ERROR;
+    }
+
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0,
+                   "http headers_in hash size: %ui, max buckets per entry: %ui",
+                    cmcf->headers_in_hash.hash_size,
+                    cmcf->headers_in_hash.min_buckets);
+
     /*
      * create the lists of ports, addresses and server names
      * to quickly find the server core module configuration at run-time