# HG changeset patch # User Igor Sysoev # Date 1260824400 -10800 # Node ID 25255878df91eae733aead855caa35aaf8275671 # Parent f107b2f5d3051997a4483eecef1efe5dfc091d64 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. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -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 в лог пишется diff --git a/auto/install b/auto/install --- a/auto/install +++ b/auto/install @@ -101,6 +101,10 @@ install: $NGX_OBJS${ngx_dirsep}nginx${ng 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' diff --git a/auto/lib/libatomic/conf b/auto/lib/libatomic/conf --- a/auto/lib/libatomic/conf +++ b/auto/lib/libatomic/conf @@ -14,7 +14,8 @@ else ngx_feature="atomic_ops library" ngx_feature_name=NGX_HAVE_LIBATOMIC ngx_feature_run=yes - ngx_feature_incs="#include " + ngx_feature_incs="#define AO_REQUIRE_CAS + #include " ngx_feature_path= ngx_feature_libs="-latomic_ops" ngx_feature_test="long n = 0; diff --git a/auto/summary b/auto/summary --- a/auto/summary +++ b/auto/summary @@ -71,6 +71,12 @@ case $ZLIB in *) 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 diff --git a/conf/fastcgi.conf b/conf/fastcgi.conf new file mode 100644 --- /dev/null +++ b/conf/fastcgi.conf @@ -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; 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 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" diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -591,17 +591,7 @@ ngx_ext_rename_file(ngx_str_t *src, ngx_ #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 diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c @@ -750,7 +750,6 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx ngx_free(p); if (h == NULL || h->h_addr_list[0] == NULL) { - ngx_free(p); u->err = "host not found"; return NGX_ERROR; } 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 @@ -89,8 +89,6 @@ static void ngx_resolver_free_locked(ngx 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) { diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -243,7 +243,6 @@ ngx_http_gzip_header_filter(ngx_http_req 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 @@ ngx_http_gzip_header_filter(ngx_http_req && 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); } 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.8.29'; +our $VERSION = '0.8.30'; require XSLoader; XSLoader::load('nginx', $VERSION); 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 @@ -2828,7 +2828,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t 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, diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h --- a/src/os/unix/ngx_atomic.h +++ b/src/os/unix/ngx_atomic.h @@ -14,6 +14,7 @@ #if (NGX_HAVE_LIBATOMIC) +#define AO_REQUIRE_CAS #include #define NGX_HAVE_ATOMIC_OPS 1