summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-09-27 13:08:50 +0000
committerJonathan Kolb <jon@b0g.us>2010-09-27 13:08:50 +0000
commitfca1ff29097d8ec1cbb25a15c4e267c015c06fb8 (patch)
tree8ead7cc2fd0f16f2df4137fa76cb92cfcf69ad2a
parent616bf64240e18b8e6b8b4e324b96b1c2a4aaba91 (diff)
downloadnginx-fca1ff29097d8ec1cbb25a15c4e267c015c06fb8.tar.gz
Changes with nginx 0.8.51 27 Sep 2010v0.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.
-rw-r--r--CHANGES11
-rw-r--r--CHANGES.ru11
-rw-r--r--src/core/nginx.c4
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_cycle.h2
-rw-r--r--src/core/ngx_resolver.c2
-rw-r--r--src/http/modules/ngx_http_secure_link_module.c40
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http.c10
-rw-r--r--src/http/ngx_http_core_module.c1
-rw-r--r--src/http/ngx_http_script.c2
-rw-r--r--src/http/ngx_http_script.h2
-rw-r--r--src/os/unix/ngx_process_cycle.c4
13 files changed, 56 insertions, 39 deletions
diff --git a/CHANGES b/CHANGES
index fa2949ce0..3644fa4bc 100644
--- 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
index ffb05d4be..64188f609 100644
--- 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
index 62cea7557..0f19371e6 100644
--- 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 *cycle)
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
index e54ed46c1..380e05724 100644
--- 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
index 3f2e2229c..d96c85ffa 100644
--- 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
index 1df86fa95..5b7bbbcb1 100644
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -138,7 +138,7 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_addr_t *addr)
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
index 24af22bd7..6c4be6191 100644
--- 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_link_commands[] = {
{ 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_request_t *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_conf_t *cf)
* conf->secret = { 0, NULL };
*/
- conf->expires = NGX_CONF_UNSET;
-
return conf;
}
@@ -339,8 +327,6 @@ ngx_http_secure_link_merge_conf(ngx_conf_t *cf, void *parent, void *child)
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
index 5eeb1c753..708481a3a 100644
--- 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
index f9aa44c1e..58fc7afe5 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1221,6 +1221,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
#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, ngx_http_core_srv_conf_t *cscf,
/* 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, ngx_http_core_srv_conf_t *cscf,
}
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
index d29d20844..73cde3d82 100644
--- 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_command_t *cmd, void *conf)
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
index 503c0f058..ef69155db 100644
--- 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_compile_complex_value_t *ccv)
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
index c1288b77a..c5b1e4066 100644
--- 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_http_request_t *r,
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
index 82d322dfc..605102558 100644
--- 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 *cycle, ngx_uint_t priority)
}
}
- 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);
}
}