ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proxy_set_header_hash_max_size|proxy_set_header_hash_bucket_size



Александр Ворона пишет:
Volodymyr Kostyrko пишет:
А патчи куда кидать надо?

сюда аттачем можно


Вопщем добавил пару команд, а то у меня вариант из флакона ругается что вышеуказанное нужно бы повысить...

--
Sphinx of black quartz judge my vow.
--- src/http/modules/ngx_http_proxy_module.c    Fri Apr 20 23:55:28 2007
+++ src/http/modules/ngx_http_proxy_module.c    Sat Apr 21 00:57:22 2007
@@ -54,6 +54,9 @@
     ngx_str_t                      port;
 
     ngx_flag_t                     redirect;
+
+    ngx_uint_t                     headers_hash_max_size;
+    ngx_uint_t                     headers_hash_bucket_size;
 } ngx_http_proxy_loc_conf_t;
 
 
@@ -207,6 +210,20 @@
       offsetof(ngx_http_proxy_loc_conf_t, headers_source),
       NULL },
 
+    { ngx_string("proxy_set_header_hash_max_size"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_proxy_loc_conf_t, headers_hash_max_size),
+      NULL },
+
+    { ngx_string("proxy_set_header_hash_bucket_size"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_num_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_proxy_loc_conf_t, headers_hash_bucket_size),
+      NULL },
+
     { ngx_string("proxy_set_body"),
       NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_str_slot,
@@ -1510,6 +1527,9 @@
     conf->redirect = NGX_CONF_UNSET;
     conf->upstream.change_buffering = 1;
 
+    conf->headers_hash_max_size = NGX_CONF_UNSET_UINT;
+    conf->headers_hash_bucket_size = NGX_CONF_UNSET_UINT;
+
     return conf;
 }
 
@@ -1799,10 +1819,18 @@
         }
     }
 
+    if (conf->headers_hash_max_size == NGX_CONF_UNSET_UINT) {
+        conf->headers_hash_max_size = 512;
+    }
+
+    if (conf->headers_hash_bucket_size == NGX_CONF_UNSET_UINT) {
+        conf->headers_hash_bucket_size = ngx_align(64, ngx_cacheline_size);
+    }
+
     hash.hash = &conf->upstream.hide_headers_hash;
     hash.key = ngx_hash_key_lc;
-    hash.max_size = 512;
-    hash.bucket_size = ngx_align(64, ngx_cacheline_size);
+    hash.max_size = conf->headers_hash_max_size;
+    hash.bucket_size = conf->headers_hash_bucket_size;
     hash.name = "proxy_hide_headers_hash";
     hash.pool = cf->pool;
     hash.temp_pool = NULL;
@@ -2068,11 +2096,18 @@
 
     *code = (uintptr_t) NULL;
 
+    if (conf->headers_hash_max_size == NGX_CONF_UNSET_UINT) {
+        conf->headers_hash_max_size = 512;
+    }
+
+    if (conf->headers_hash_bucket_size == NGX_CONF_UNSET_UINT) {
+        conf->headers_hash_bucket_size = ngx_cacheline_size;
+    }
 
     hash.hash = &conf->headers_set_hash;
     hash.key = ngx_hash_key_lc;
-    hash.max_size = 512;
-    hash.bucket_size = ngx_cacheline_size;
+    hash.max_size = conf->headers_hash_max_size;
+    hash.bucket_size = conf->headers_hash_bucket_size;
     hash.name = "proxy_set_header_hash";
     hash.pool = cf->pool;
     hash.temp_pool = NULL;


 




Copyright © Lexa Software, 1996-2009.