# HG changeset patch # User Igor Sysoev # Date 1285531200 -14400 # Node ID be70f83b184f95fb120e072d0ab320507edc9d50 # Parent 1695031dbfed019230a1b0ef82419114c43bd07d nginx 0.8.51 *) Change: the "secure_link_expires" directive has been canceled. *) Change: a logging level of resolver errors has been lowered from "alert" to "error". *) Feature: now a listen socket "ssl" parameter may be set several times. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,15 @@ +Changes with nginx 0.8.51 27 Sep 2010 + + *) Change: the "secure_link_expires" directive has been canceled. + + *) Change: a logging level of resolver errors has been lowered from + "alert" to "error". + + *) Feature: now a listen socket "ssl" parameter may be set several + times. + + Changes with nginx 0.8.50 02 Sep 2010 *) Feature: the "secure_link", "secure_link_md5", and diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,15 @@ +Изменения в nginx 0.8.51 27.09.2010 + + *) Изменение: директива secure_link_expires упразднена. + + *) Изменение: уровень логгирования ошибок resolver'а понижен с уровня + alert на error. + + *) Добавление: теперь параметр "ssl" listen-сокета можно устанавливать + несколько раз. + + Изменения в nginx 0.8.50 02.09.2010 *) Добавление: директивы secure_link, secure_link_md5 и diff --git a/src/core/nginx.c b/src/core/nginx.c --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -110,7 +110,7 @@ static ngx_command_t ngx_core_commands[ { ngx_string("worker_rlimit_core"), NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, - ngx_conf_set_size_slot, + ngx_conf_set_off_slot, 0, offsetof(ngx_core_conf_t, rlimit_core), NULL }, @@ -941,7 +941,7 @@ ngx_core_module_create_conf(ngx_cycle_t ccf->debug_points = NGX_CONF_UNSET; ccf->rlimit_nofile = NGX_CONF_UNSET; - ccf->rlimit_core = NGX_CONF_UNSET_SIZE; + ccf->rlimit_core = NGX_CONF_UNSET; ccf->rlimit_sigpending = NGX_CONF_UNSET; ccf->user = (ngx_uid_t) NGX_CONF_UNSET_UINT; diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,8 +8,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 8050 -#define NGINX_VERSION "0.8.50" +#define nginx_version 8051 +#define NGINX_VERSION "0.8.51" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h --- a/src/core/ngx_cycle.h +++ b/src/core/ngx_cycle.h @@ -78,7 +78,7 @@ typedef struct { ngx_int_t rlimit_nofile; ngx_int_t rlimit_sigpending; - size_t rlimit_core; + off_t rlimit_core; int priority; diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -138,7 +138,7 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_ r->valid = 300; r->log = &cf->cycle->new_log; - r->log_level = NGX_LOG_ALERT; + r->log_level = NGX_LOG_ERR; if (addr) { uc = ngx_calloc(sizeof(ngx_udp_connection_t), cf->log); diff --git a/src/http/modules/ngx_http_secure_link_module.c b/src/http/modules/ngx_http_secure_link_module.c --- a/src/http/modules/ngx_http_secure_link_module.c +++ b/src/http/modules/ngx_http_secure_link_module.c @@ -14,7 +14,6 @@ typedef struct { ngx_http_complex_value_t *variable; ngx_http_complex_value_t *md5; ngx_str_t secret; - ngx_flag_t expires; } ngx_http_secure_link_conf_t; @@ -38,25 +37,18 @@ static ngx_command_t ngx_http_secure_li { ngx_string("secure_link"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, - ngx_http_set_comlex_value_slot, + ngx_http_set_complex_value_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_secure_link_conf_t, variable), NULL }, { ngx_string("secure_link_md5"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, - ngx_http_set_comlex_value_slot, + ngx_http_set_complex_value_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_secure_link_conf_t, md5), NULL }, - { ngx_string("secure_link_expires"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, - ngx_conf_set_flag_slot, - NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_secure_link_conf_t, expires), - NULL }, - { ngx_string("secure_link_secret"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_str_slot, @@ -141,22 +133,20 @@ ngx_http_secure_link_variable(ngx_http_r if (p) { val.len = p++ - val.data; - if (conf->expires) { - expires = ngx_atotm(p, last - p); - if (expires <= 0) { - goto not_found; - } + expires = ngx_atotm(p, last - p); + if (expires <= 0) { + goto not_found; + } - ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_secure_link_ctx_t)); - if (ctx == NULL) { - return NGX_ERROR; - } + ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_secure_link_ctx_t)); + if (ctx == NULL) { + return NGX_ERROR; + } - ngx_http_set_ctx(r, ctx, ngx_http_secure_link_module); + ngx_http_set_ctx(r, ctx, ngx_http_secure_link_module); - ctx->expires.len = last - p; - ctx->expires.data = p; - } + ctx->expires.len = last - p; + ctx->expires.data = p; } if (val.len > 24) { @@ -317,8 +307,6 @@ ngx_http_secure_link_create_conf(ngx_con * conf->secret = { 0, NULL }; */ - conf->expires = NGX_CONF_UNSET; - return conf; } @@ -339,8 +327,6 @@ ngx_http_secure_link_merge_conf(ngx_conf conf->md5 = prev->md5; } - ngx_conf_merge_value(conf->expires, prev->expires, 0); - return NGX_CONF_OK; } diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -48,7 +48,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.8.50'; +our $VERSION = '0.8.51'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1221,6 +1221,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, n #if (NGX_HAVE_UNIX_DOMAIN) struct sockaddr_un *saun; #endif +#if (NGX_HTTP_SSL) + ngx_uint_t ssl; +#endif /* * we can not compare whole sockaddr struct's as kernel @@ -1270,6 +1273,10 @@ ngx_http_add_addresses(ngx_conf_t *cf, n /* preserve default_server bit during listen options overwriting */ default_server = addr[i].opt.default_server; +#if (NGX_HTTP_SSL) + ssl = lsopt->ssl || addr[i].opt.set; +#endif + if (lsopt->set) { if (addr[i].opt.set) { @@ -1296,6 +1303,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, n } addr[i].opt.default_server = default_server; +#if (NGX_HTTP_SSL) + addr[i].opt.ssl = ssl; +#endif return NGX_OK; } diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3569,7 +3569,6 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx if (ngx_strcmp(value[n].data, "ssl") == 0) { #if (NGX_HTTP_SSL) - lsopt.set = 1; lsopt.ssl = 1; continue; #else diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -212,7 +212,7 @@ ngx_http_compile_complex_value(ngx_http_ char * -ngx_http_set_comlex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) +ngx_http_set_complex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *p = conf; diff --git a/src/http/ngx_http_script.h b/src/http/ngx_http_script.h --- a/src/http/ngx_http_script.h +++ b/src/http/ngx_http_script.h @@ -207,7 +207,7 @@ void ngx_http_script_flush_complex_value ngx_int_t ngx_http_complex_value(ngx_http_request_t *r, ngx_http_complex_value_t *val, ngx_str_t *value); ngx_int_t ngx_http_compile_complex_value(ngx_http_compile_complex_value_t *ccv); -char * ngx_http_set_comlex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd, +char *ngx_http_set_complex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -856,13 +856,13 @@ ngx_worker_process_init(ngx_cycle_t *cyc } } - if (ccf->rlimit_core != NGX_CONF_UNSET_SIZE) { + if (ccf->rlimit_core != NGX_CONF_UNSET) { rlmt.rlim_cur = (rlim_t) ccf->rlimit_core; rlmt.rlim_max = (rlim_t) ccf->rlimit_core; if (setrlimit(RLIMIT_CORE, &rlmt) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, - "setrlimit(RLIMIT_CORE, %i) failed", + "setrlimit(RLIMIT_CORE, %O) failed", ccf->rlimit_core); } }