changeset 498:ef5c97e49c35 NGINX_0_7_61

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.
author Igor Sysoev <http://sysoev.ru>
date Mon, 22 Jun 2009 00:00:00 +0400
parents b0914e65af8e
children f2c782e5161f
files CHANGES CHANGES.ru auto/lib/md5/conf src/core/nginx.h src/event/ngx_event_accept.c src/http/modules/ngx_http_proxy_module.c src/http/modules/perl/nginx.pm src/http/ngx_http_request.c src/http/ngx_http_upstream.c src/mail/ngx_mail_handler.c
diffstat 10 files changed, 60 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon Jun 15 00:00:00 2009 +0400
+++ b/CHANGES	Mon Jun 22 00:00:00 2009 +0400
@@ -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 
--- a/CHANGES.ru	Mon Jun 15 00:00:00 2009 +0400
+++ b/CHANGES.ru	Mon Jun 22 00:00:00 2009 +0400
@@ -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 и 
--- a/auto/lib/md5/conf	Mon Jun 15 00:00:00 2009 +0400
+++ b/auto/lib/md5/conf	Mon Jun 22 00:00:00 2009 +0400
@@ -100,9 +100,9 @@
 
 $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=<path> option.
+--with-http_ssl_module --with-openssl=<path> options.
 
 END
             exit 1
--- a/src/core/nginx.h	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/core/nginx.h	Mon Jun 22 00:00:00 2009 +0400
@@ -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"
--- a/src/event/ngx_event_accept.c	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/event/ngx_event_accept.c	Mon Jun 22 00:00:00 2009 +0400
@@ -75,7 +75,7 @@
         }
 
 #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 @@
         }
 
 #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 @@
         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 @@
     }
 
 #if (NGX_STAT_STUB)
-    ngx_atomic_fetch_add(ngx_stat_active, -1);
+    (void) ngx_atomic_fetch_add(ngx_stat_active, -1);
 #endif
 }
 
--- a/src/http/modules/ngx_http_proxy_module.c	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/http/modules/ngx_http_proxy_module.c	Mon Jun 22 00:00:00 2009 +0400
@@ -2343,7 +2343,10 @@
     }
 
     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;
     }
--- a/src/http/modules/perl/nginx.pm	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/http/modules/perl/nginx.pm	Mon Jun 22 00:00:00 2009 +0400
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.7.60';
+our $VERSION = '0.7.61';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http_request.c	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/http/ngx_http_request.c	Mon Jun 22 00:00:00 2009 +0400
@@ -198,7 +198,7 @@
     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 @@
 
     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 @@
 #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 @@
     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 @@
     }
 
 #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_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 @@
     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 @@
 #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 @@
 #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;
--- a/src/http/ngx_http_upstream.c	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/http/ngx_http_upstream.c	Mon Jun 22 00:00:00 2009 +0400
@@ -1573,8 +1573,9 @@
 
         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 @@
         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;
         }
--- a/src/mail/ngx_mail_handler.c	Mon Jun 15 00:00:00 2009 +0400
+++ b/src/mail/ngx_mail_handler.c	Mon Jun 22 00:00:00 2009 +0400
@@ -710,7 +710,7 @@
 #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;