# HG changeset patch # User Igor Sysoev # Date 1245614400 -14400 # Node ID ef5c97e49c35afce9c48a8126ea6871ec39fd1a5 # Parent b0914e65af8e60ced1bc87c4da05276a35d68c03 nginx 0.7.61 *) Bugfix: nginx could not be built on MacOSX 10.6. the bug had appeared in 0.8.2. *) Bugfix: nginx could not be built --without-http-cache; the bug had appeared in 0.7.60. *) Bugfix: a segmentation fault occurred in worker process, if a backend 401 error was intercepted and the backend did not set the "WWW-Authenticate" response header line. Thanks to Eugene Mychlo. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,18 @@ +Changes with nginx 0.7.61 22 Jun 2009 + + *) Bugfix: nginx could not be built on MacOSX 10.6. the bug had + appeared in 0.8.2. + + *) Bugfix: nginx could not be built --without-http-cache; the bug had + appeared in 0.7.60. + + *) Bugfix: a segmentation fault occurred in worker process, if a + backend 401 error was intercepted and the backend did not set the + "WWW-Authenticate" response header line. + Thanks to Eugene Mychlo. + + Changes with nginx 0.7.60 15 Jun 2009 *) Feature: the "updating" parameter in "proxy_cache_use_stale" and diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,17 @@ +Изменения в nginx 0.7.61 22.06.2009 + + *) Исправление: nginx не собирался на MacOSX 10.6. + + *) Исправление: nginx не собирался с параметром --without-http-cache; + ошибка появилась в 0.7.60. + + *) Исправление: если было использовался перехват 401 ошибки от бэкенда + и бэкенд не возвращал строку "WWW-Authenticate" в заголовке ответа, + то в рабочем процессе происходил segmentation fault. + Спасибо Евгению Мычло. + + Изменения в nginx 0.7.60 15.06.2009 *) Добавление: параметр updating в директивах proxy_cache_use_stale и diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf @@ -100,9 +100,9 @@ cat << END $0: error: the HTTP cache module requires md5 functions from OpenSSL library. You can either disable the module by using ---without-http_cache option, or install the OpenSSL library into the system, +--without-http-cache option, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using ---with-openssl= option. +--with-http_ssl_module --with-openssl= options. END exit 1 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 7060 -#define NGINX_VERSION "0.7.60" +#define nginx_version 7061 +#define NGINX_VERSION "0.7.61" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c --- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c @@ -75,7 +75,7 @@ ngx_event_accept(ngx_event_t *ev) } #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_accepted, 1); + (void) ngx_atomic_fetch_add(ngx_stat_accepted, 1); #endif ngx_accept_disabled = ngx_cycle->connection_n / 8 @@ -93,7 +93,7 @@ ngx_event_accept(ngx_event_t *ev) } #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_active, 1); + (void) ngx_atomic_fetch_add(ngx_stat_active, 1); #endif c->pool = ngx_create_pool(ls->pool_size, ev->log); @@ -188,7 +188,7 @@ ngx_event_accept(ngx_event_t *ev) c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1); #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_handled, 1); + (void) ngx_atomic_fetch_add(ngx_stat_handled, 1); #endif #if (NGX_THREADS) @@ -379,7 +379,7 @@ ngx_close_accepted_connection(ngx_connec } #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_active, -1); + (void) ngx_atomic_fetch_add(ngx_stat_active, -1); #endif } diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2343,7 +2343,10 @@ ngx_http_proxy_merge_headers(ngx_conf_t } if (conf->headers_set_hash.buckets - && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))) +#if (NGX_HTTP_CACHE) + && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL)) +#endif + ) { return NGX_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 @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.7.60'; +our $VERSION = '0.7.61'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -198,7 +198,7 @@ ngx_http_init_connection(ngx_connection_ c->write->handler = ngx_http_empty_handler; #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, 1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif if (rev->ready) { @@ -217,7 +217,7 @@ ngx_http_init_connection(ngx_connection_ if (ngx_handle_read_event(rev, 0) != NGX_OK) { #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, -1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif ngx_http_close_connection(c); return; @@ -247,7 +247,7 @@ ngx_http_init_request(ngx_event_t *rev) #endif #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, -1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif c = rev->data; @@ -497,9 +497,9 @@ ngx_http_init_request(ngx_event_t *rev) r->log_handler = ngx_http_log_error_handler; #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, 1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); r->stat_reading = 1; - ngx_atomic_fetch_add(ngx_stat_requests, 1); + (void) ngx_atomic_fetch_add(ngx_stat_requests, 1); #endif rev->handler(rev); @@ -1544,9 +1544,9 @@ ngx_http_process_request(ngx_http_reques } #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, -1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); r->stat_reading = 0; - ngx_atomic_fetch_add(ngx_stat_writing, 1); + (void) ngx_atomic_fetch_add(ngx_stat_writing, 1); r->stat_writing = 1; #endif @@ -2316,7 +2316,7 @@ ngx_http_set_keepalive(ngx_http_request_ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, 1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif hc->pipeline = 1; @@ -2546,7 +2546,7 @@ ngx_http_keepalive_handler(ngx_event_t * b->last += n; #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_reading, 1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif c->log->handler = ngx_http_log_error; @@ -2775,11 +2775,11 @@ ngx_http_request_done(ngx_http_request_t #if (NGX_STAT_STUB) if (r->stat_reading) { - ngx_atomic_fetch_add(ngx_stat_reading, -1); + (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); } if (r->stat_writing) { - ngx_atomic_fetch_add(ngx_stat_writing, -1); + (void) ngx_atomic_fetch_add(ngx_stat_writing, -1); } #endif @@ -2860,7 +2860,7 @@ ngx_http_close_connection(ngx_connection #endif #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_active, -1); + (void) ngx_atomic_fetch_add(ngx_stat_active, -1); #endif c->destroyed = 1; diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1573,8 +1573,9 @@ ngx_http_upstream_intercept_errors(ngx_h if (err_page[i].status == status) { - if (status == NGX_HTTP_UNAUTHORIZED) { - + if (status == NGX_HTTP_UNAUTHORIZED + && u->headers_in.www_authenticate) + { h = ngx_list_push(&r->headers_out.headers); if (h == NULL) { @@ -4086,7 +4087,10 @@ ngx_http_upstream_hide_headers_hash(ngx_ conf->hide_headers_hash = prev->hide_headers_hash; if (conf->hide_headers_hash.buckets - && ((conf->cache == NULL) == (prev->cache == NULL))) +#if (NGX_HTTP_CACHE) + && ((conf->cache == NULL) == (prev->cache == NULL)) +#endif + ) { return NGX_OK; } diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -710,7 +710,7 @@ ngx_mail_close_connection(ngx_connection #endif #if (NGX_STAT_STUB) - ngx_atomic_fetch_add(ngx_stat_active, -1); + (void) ngx_atomic_fetch_add(ngx_stat_active, -1); #endif c->destroyed = 1;