changeset 556:25255878df91 NGINX_0_8_30

nginx 0.8.30 *) Change: now the default buffer size of the "large_client_header_buffers" directive is 8K. Thanks to Andrew Cholakian. *) Feature: the conf/fastcgi.conf for simple FastCGI configurations. *) Bugfix: nginx/Windows tried to rename a temporary file twice if the file should replace an already existent file. *) Bugfix: of "double free or corruption" error issued if host could not be resolved; the bug had appeared in 0.8.22. Thanks to Konstantin Svist. *) Bugfix: in libatomic usage on some platforms. Thanks to W-Mark Kubacki.
author Igor Sysoev <http://sysoev.ru>
date Tue, 15 Dec 2009 00:00:00 +0300
parents f107b2f5d305
children 72104cd120ec
files CHANGES CHANGES.ru auto/install auto/lib/libatomic/conf auto/summary conf/fastcgi.conf src/core/nginx.h src/core/ngx_file.c src/core/ngx_inet.c src/core/ngx_resolver.c src/http/modules/ngx_http_gzip_filter_module.c src/http/modules/perl/nginx.pm src/http/ngx_http_core_module.c src/os/unix/ngx_atomic.h
diffstat 14 files changed, 82 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon Nov 30 00:00:00 2009 +0300
+++ b/CHANGES	Tue Dec 15 00:00:00 2009 +0300
@@ -1,4 +1,23 @@
 
+Changes with nginx 0.8.30                                        15 Dec 2009
+
+    *) Change: now the default buffer size of the 
+       "large_client_header_buffers" directive is 8K.
+       Thanks to Andrew Cholakian.
+
+    *) Feature: the conf/fastcgi.conf for simple FastCGI configurations.
+
+    *) Bugfix: nginx/Windows tried to rename a temporary file twice if the 
+       file should replace an already existent file.
+
+    *) Bugfix: of "double free or corruption" error issued if host could 
+       not be resolved; the bug had appeared in 0.8.22.
+       Thanks to Konstantin Svist.
+
+    *) Bugfix: in libatomic usage on some platforms.
+       Thanks to W-Mark Kubacki.
+
+
 Changes with nginx 0.8.29                                        30 Nov 2009
 
     *) Change: now the "009" status code is written to an access log for 
--- a/CHANGES.ru	Mon Nov 30 00:00:00 2009 +0300
+++ b/CHANGES.ru	Tue Dec 15 00:00:00 2009 +0300
@@ -1,4 +1,23 @@
 
+Изменения в nginx 0.8.30                                          15.12.2009
+
+    *) Изменение: теперь по умолчанию размер буфера директивы 
+       large_client_header_buffers равен 8K.
+       Спасибо Andrew Cholakian.
+
+    *) Добавление: файл conf/fastcgi.conf для простых конфигураций FastCGI.
+
+    *) Исправление: nginx/Windows пытался дважды переименовать временный 
+       файл при перезаписи уже существующего файла.
+
+    *) Исправление: ошибки double free or corruption, возникающей, если имя 
+       хоста не было найдено; ошибка появилась в 0.8.22.
+       Спасибо Константину Свисту.
+
+    *) Исправление: в использовании libatomic на некоторых платформах.
+       Спасибо W-Mark Kubacki.
+
+
 Изменения в nginx 0.8.29                                          30.11.2009
 
     *) Изменение: теперь для проксируемых ответов HTTP/0.9 в лог пишется 
--- a/auto/install	Mon Nov 30 00:00:00 2009 +0300
+++ b/auto/install	Tue Dec 15 00:00:00 2009 +0300
@@ -101,6 +101,10 @@
 	cp conf/fastcgi_params \
 		'\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default'
 
+	test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \
+		|| cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX'
+	cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default'
+
 	test -f '\$(DESTDIR)$NGX_CONF_PATH' \
 		|| cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH'
 	cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default'
--- a/auto/lib/libatomic/conf	Mon Nov 30 00:00:00 2009 +0300
+++ b/auto/lib/libatomic/conf	Tue Dec 15 00:00:00 2009 +0300
@@ -14,7 +14,8 @@
     ngx_feature="atomic_ops library"
     ngx_feature_name=NGX_HAVE_LIBATOMIC
     ngx_feature_run=yes
-    ngx_feature_incs="#include <atomic_ops.h>"
+    ngx_feature_incs="#define AO_REQUIRE_CAS
+                      #include <atomic_ops.h>"
     ngx_feature_path=
     ngx_feature_libs="-latomic_ops"
     ngx_feature_test="long  n = 0;
--- a/auto/summary	Mon Nov 30 00:00:00 2009 +0300
+++ b/auto/summary	Tue Dec 15 00:00:00 2009 +0300
@@ -71,6 +71,12 @@
     *)     echo "  + using zlib library: $ZLIB" ;;
 esac
 
+case $NGX_LIBATOMIC in
+    YES)   echo "  + using system libatomic_ops library" ;;
+    NO)    ;; # not used
+    *)     echo "  + using libatomic_ops library: $NGX_LIBATOMIC" ;;
+esac
+
 echo
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/conf/fastcgi.conf	Tue Dec 15 00:00:00 2009 +0300
@@ -0,0 +1,24 @@
+
+fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
+fastcgi_param  QUERY_STRING       $query_string;
+fastcgi_param  REQUEST_METHOD     $request_method;
+fastcgi_param  CONTENT_TYPE       $content_type;
+fastcgi_param  CONTENT_LENGTH     $content_length;
+
+fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
+fastcgi_param  REQUEST_URI        $request_uri;
+fastcgi_param  DOCUMENT_URI       $document_uri;
+fastcgi_param  DOCUMENT_ROOT      $document_root;
+fastcgi_param  SERVER_PROTOCOL    $server_protocol;
+
+fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
+fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
+
+fastcgi_param  REMOTE_ADDR        $remote_addr;
+fastcgi_param  REMOTE_PORT        $remote_port;
+fastcgi_param  SERVER_ADDR        $server_addr;
+fastcgi_param  SERVER_PORT        $server_port;
+fastcgi_param  SERVER_NAME        $server_name;
+
+# PHP only, required if PHP was built with --enable-force-cgi-redirect
+fastcgi_param  REDIRECT_STATUS    200;
--- a/src/core/nginx.h	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/core/nginx.h	Tue Dec 15 00:00:00 2009 +0300
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version         8029
-#define NGINX_VERSION      "0.8.29"
+#define nginx_version         8030
+#define NGINX_VERSION      "0.8.30"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/core/ngx_file.c	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/core/ngx_file.c	Tue Dec 15 00:00:00 2009 +0300
@@ -591,17 +591,7 @@
 #if (NGX_WIN32)
 
     if (err == NGX_EEXIST) {
-        if (ngx_win32_rename_file(src, to, ext->log) == NGX_OK) {
-
-            if (ngx_rename_file(src->data, to->data) != NGX_FILE_ERROR) {
-                return NGX_OK;
-            }
-
-            err = ngx_errno;
-
-        } else {
-            err = 0;
-        }
+        err = ngx_win32_rename_file(src, to, ext->log);
     }
 
 #endif
--- a/src/core/ngx_inet.c	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/core/ngx_inet.c	Tue Dec 15 00:00:00 2009 +0300
@@ -750,7 +750,6 @@
             ngx_free(p);
 
             if (h == NULL || h->h_addr_list[0] == NULL) {
-                ngx_free(p);
                 u->err = "host not found";
                 return NGX_ERROR;
             }
--- a/src/core/ngx_resolver.c	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/core/ngx_resolver.c	Tue Dec 15 00:00:00 2009 +0300
@@ -89,8 +89,6 @@
 static void *ngx_resolver_dup(ngx_resolver_t *r, void *src, size_t size);
 
 
-/* STUB: ngx_peer_addr_t * */
-
 ngx_resolver_t *
 ngx_resolver_create(ngx_conf_t *cf, ngx_addr_t *addr)
 {
--- a/src/http/modules/ngx_http_gzip_filter_module.c	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/http/modules/ngx_http_gzip_filter_module.c	Tue Dec 15 00:00:00 2009 +0300
@@ -243,7 +243,6 @@
     conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module);
 
     if (!conf->enable
-        || r->header_only
         || (r->headers_out.status != NGX_HTTP_OK
             && r->headers_out.status != NGX_HTTP_FORBIDDEN
             && r->headers_out.status != NGX_HTTP_NOT_FOUND)
@@ -251,7 +250,8 @@
             && r->headers_out.content_encoding->value.len)
         || (r->headers_out.content_length_n != -1
             && r->headers_out.content_length_n < conf->min_length)
-        || ngx_http_test_content_type(r, &conf->types) == NULL)
+        || ngx_http_test_content_type(r, &conf->types) == NULL
+        || r->header_only)
     {
         return ngx_http_next_header_filter(r);
     }
--- a/src/http/modules/perl/nginx.pm	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/http/modules/perl/nginx.pm	Tue Dec 15 00:00:00 2009 +0300
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.8.29';
+our $VERSION = '0.8.30';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http_core_module.c	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/http/ngx_http_core_module.c	Tue Dec 15 00:00:00 2009 +0300
@@ -2828,7 +2828,7 @@
                               prev->client_header_buffer_size, 1024);
     ngx_conf_merge_bufs_value(conf->large_client_header_buffers,
                               prev->large_client_header_buffers,
-                              4, ngx_pagesize);
+                              4, 8192);
 
     if (conf->large_client_header_buffers.size < conf->connection_pool_size) {
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
--- a/src/os/unix/ngx_atomic.h	Mon Nov 30 00:00:00 2009 +0300
+++ b/src/os/unix/ngx_atomic.h	Tue Dec 15 00:00:00 2009 +0300
@@ -14,6 +14,7 @@
 
 #if (NGX_HAVE_LIBATOMIC)
 
+#define AO_REQUIRE_CAS
 #include <atomic_ops.h>
 
 #define NGX_HAVE_ATOMIC_OPS  1