diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-02-08 18:33:12 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-02-08 18:33:12 +0300 |
commit | ffe714403d604b385c89daa7fe5a83860a672a54 (patch) | |
tree | 24ce46a2354a79212f91fdbc3d6045ea340c3f12 /src/http/ngx_http_core_module.c | |
parent | 2446d5d6adf67d81883024ffb20ec21d146c0450 (diff) |
nginx-0.3.27-RELEASE importrelease-0.3.27
*) Change: the "variables_hash_max_size" and
"variables_hash_bucket_size" directives.
*) Feature: the $body_bytes_sent variable can be used not only in the
"log_format" directive.
*) Feature: the $ssl_protocol and $ssl_cipher variables.
*) Feature: the cache line size detection for widespread CPUs at start
time.
*) Feature: now the "accept_mutex" directive is supported using
fcntl(2) on platforms different from i386, amd64, sparc64, and ppc.
*) Feature: the "lock_file" directive and the --with-lock-path=PATH
autoconfiguration directive.
*) Bugfix: if the HTTPS protocol was used in the "proxy_pass" directive
then the requests with the body was not transferred.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 89f846c97..1bc43dec0 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -77,6 +77,20 @@ static ngx_conf_enum_t ngx_http_restrict_host_names[] = { static ngx_command_t ngx_http_core_commands[] = { + { ngx_string("variables_hash_max_size"), + NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, + ngx_conf_set_num_slot, + NGX_HTTP_MAIN_CONF_OFFSET, + offsetof(ngx_http_core_main_conf_t, variables_hash_max_size), + NULL }, + + { ngx_string("variables_hash_bucket_size"), + NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, + ngx_conf_set_num_slot, + NGX_HTTP_MAIN_CONF_OFFSET, + offsetof(ngx_http_core_main_conf_t, variables_hash_bucket_size), + NULL }, + { ngx_string("server_names_hash_max_size"), NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, ngx_conf_set_num_slot, @@ -1787,6 +1801,9 @@ ngx_http_core_create_main_conf(ngx_conf_t *cf) cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT; cmcf->server_names_hash_bucket_size = NGX_CONF_UNSET_UINT; + cmcf->variables_hash_max_size = NGX_CONF_UNSET_UINT; + cmcf->variables_hash_bucket_size = NGX_CONF_UNSET_UINT; + return cmcf; } @@ -1807,6 +1824,18 @@ ngx_http_core_init_main_conf(ngx_conf_t *cf, void *conf) cmcf->server_names_hash_bucket_size = ngx_align(cmcf->server_names_hash_bucket_size, ngx_cacheline_size); + + if (cmcf->variables_hash_max_size == NGX_CONF_UNSET_UINT) { + cmcf->variables_hash_max_size = 512; + } + + if (cmcf->variables_hash_bucket_size == NGX_CONF_UNSET_UINT) { + cmcf->variables_hash_bucket_size = 64; + } + + cmcf->variables_hash_bucket_size = + ngx_align(cmcf->variables_hash_bucket_size, ngx_cacheline_size); + return NGX_CONF_OK; } @@ -2224,7 +2253,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ls->family = AF_INET; ls->port = (in_port_t) (inet_upstream.default_port ? - 80 : inet_upstream.port); + 80 : inet_upstream.port); ls->file_name = cf->conf_file->file.name; ls->line = cf->conf_file->line; ls->conf.backlog = -1; |