changeset 352:84b8345f70d5 NGINX_0_6_20

nginx 0.6.20 *) Bugfix: a segmentation fault might occur in worker process if a "proxy_pass" directive with URI-part was used; bug appeared in 0.6.19.
author Igor Sysoev <http://sysoev.ru>
date Wed, 28 Nov 2007 00:00:00 +0300
parents 4bc23dc655fd
children 4a470d9e2ea5
files CHANGES CHANGES.ru src/core/nginx.h src/http/modules/ngx_http_proxy_module.c src/http/modules/perl/nginx.pm src/http/ngx_http.h
diffstat 6 files changed, 386 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,11 @@
 
+Changes with nginx 0.6.20                                        28 Nov 2007
+
+    *) Bugfix: a segmentation fault might occur in worker process if a 
+       "proxy_pass" directive with URI-part was used; bug appeared in 
+       0.6.19.
+
+
 Changes with nginx 0.6.19                                        27 Nov 2007
 
     *) Bugfix: the 0.6.18 version could not be built.
@@ -365,6 +372,185 @@ Changes with nginx 0.6.0                
        support the "www.example.*" wildcards.
 
 
+Changes with nginx 0.5.33                                        07 Nov 2007
+
+    *) Change: now by default the "echo" SSI command uses entity encoding.
+
+    *) Feature: the "encoding" parameter in the "echo" SSI command.
+
+    *) Change: mail proxy was split on three modules: pop3, imap and smtp.
+
+    *) Feature: the --without-mail_pop3_module, --without-mail_imap_module, 
+       and --without-mail_smtp_module configuration parameters.
+
+    *) Feature: the "smtp_greeting_delay" and "smtp_client_buffer" 
+       directives of the ngx_mail_smtp_module.
+
+    *) Feature: the "server_name" and "valid_referers" directives support 
+       regular expressions.
+
+    *) Feature: the "server_name", "map", and "valid_referers" directives 
+       support the "www.example.*" wildcards.
+
+    *) Bugfix: sub_filter did not work with empty substitution.
+
+    *) Bugfix: in sub_filter parsing.
+
+    *) Bugfix: a worker process may got caught in an endless loop, if the 
+       memcached was used.
+
+    *) Bugfix: nginx supported low case only "close" and "keep-alive" 
+       values in the "Connection" request header line; bug appeared in 
+       0.5.32.
+
+    *) Bugfix: nginx could not start on Solaris if the shared PCRE library 
+       located in non-standard place was used.
+
+
+Changes with nginx 0.5.32                                        24 Sep 2007
+
+    *) Change: now nginx tries to set the "worker_priority", 
+       "worker_rlimit_nofile", "worker_rlimit_core", and 
+       "worker_rlimit_sigpending" without super-user privileges.
+
+    *) Change: now nginx escapes space and "%" in request to a mail proxy 
+       authentication server.
+
+    *) Change: now nginx escapes "%" in $memcached_key variable.
+
+    *) Change: the special make target "upgrade1" was defined for online 
+       upgrade of 0.1.x versions.
+
+    *) Feature: the "add_header Last-Modified ..." directive changes the 
+       "Last-Modified" response header line.
+
+    *) Feature: the mail proxy supports AUTHENTICATE in IMAP mode.
+       Thanks to Maxim Dounin.
+
+    *) Feature: the mail proxy supports STARTTLS in SMTP mode.
+       Thanks to Maxim Dounin.
+
+    *) Bugfix: nginx did not close directory file on HEAD request if 
+       autoindex was used.
+       Thanks to Arkadiusz Patyk.
+
+    *) Bugfix: the "proxy_hide_header" and "fastcgi_hide_header" directives 
+       did not hide response header lines whose name was longer than 32 
+       characters.
+       Thanks to Manlio Perillo.
+
+    *) Bugfix: active connection counter always increased if mail proxy was 
+       used.
+
+    *) Bugfix: if backend returned response header only using non-buffered 
+       proxy, then nginx closed backend connection on timeout.
+
+    *) Bugfix: nginx did not support several "Connection" request header 
+       lines.
+
+    *) Bugfix: a charset set by the "charset" directive was not appended to 
+       the "Content-Type" header set by $r->send_http_header().
+
+    *) Bugfix: a segmentation fault might occur in worker process if 
+       /dev/poll method was used.
+
+    *) Bugfix: nginx did not work on FreeBSD/sparc64.
+
+    *) Bugfix: a segmentation fault occurred in worker process if invalid 
+       address was set in the "auth_http" directive.
+
+    *) Bugfix: now nginx uses default listen backlog value 511 on all 
+       platforms except FreeBSD.
+       Thanks to Jiang Hong.
+
+    *) Bugfix: now Solaris sendfilev() is not used to transfer the client 
+       request body to FastCGI-server via the unix domain socket.
+
+    *) Bugfix: if the same host without specified port was used as backend 
+       for HTTP and HTTPS, then nginx used only one port - 80 or 443.
+
+    *) Bugfix: the "proxy_ignore_client_abort" and 
+       "fastcgi_ignore_client_abort" directives did not work; bug appeared 
+       in 0.5.13.
+
+
+Changes with nginx 0.5.31                                        15 Aug 2007
+
+    *) Feature: named locations.
+
+    *) Feature: the "proxy_store" and "fastcgi_store" directives.
+
+    *) Feature: the "proxy_store_access" and "fastcgi_store_access" 
+       directives.
+
+
+Changes with nginx 0.5.30                                        30 Jul 2007
+
+    *) Feature: the $args variable can be set with the "set" directive.
+
+    *) Feature: the $is_args variable.
+
+    *) Bugfix: if a client has closed connection to mail proxy then nginx 
+       might not close connection to backend.
+
+    *) Bugfix: now nginx escapes space in $memcached_key variable.
+
+    *) Bugfix: a segmentation fault might occur in worker process when the 
+       HTTPS protocol was used in the "proxy_pass" directive.
+
+    *) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal 
+       to the master process identification number.
+
+    *) Bugfix: fix building on Solaris/amd64 by Sun Studio 11 and early 
+       versions; bug appeared in 0.5.29.
+
+
+Changes with nginx 0.5.29                                        23 Jul 2007
+
+    *) Feature: $nginx_version variable.
+       Thanks to Nick S. Grechukh.
+
+    *) Bugfix: if the FastCGI header was split in records, then nginx 
+       passed garbage in the header to a client.
+
+    *) Bugfix: Sun Studio compatibility on Solaris/amd64 and 
+       Solaris/sparc64.
+       Thanks to Jiang Hong and Andrei Nigmatulin.
+
+    *) Bugfix: of minor potential bugs.
+       Thanks to Coverity's Scan.
+
+
+Changes with nginx 0.5.28                                        17 Jul 2007
+
+    *) Security: the "msie_refresh" directive allowed XSS.
+       Thanks to Maxim Boguk.
+
+    *) Bugfix: a segmentation fault might occur in worker process if the 
+       "auth_http_header" directive was used.
+       Thanks to Maxim Dounin.
+
+    *) Bugfix: a segmentation fault occurred in worker process if the 
+       CRAM-MD5 authentication method was used, but it was not enabled.
+
+    *) Bugfix: a segmentation fault might occur in worker process if the 
+       eventport method was used.
+
+
+Changes with nginx 0.5.27                                        09 Jul 2007
+
+    *) Bugfix: if remote SSI subrequest was used, then posterior local file 
+       subrequest might transferred to client in wrong order.
+
+    *) Bugfix: large SSI inclusions buffered in temporary files were 
+       truncated.
+
+
+Changes with nginx 0.5.26                                        17 Jun 2007
+
+    *) Bugfix: in SSI parsing.
+
+
 Changes with nginx 0.5.25                                        11 Jun 2007
 
     *) Bugfix: nginx could not be built with the 
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,11 @@
 
+Изменения в nginx 0.6.20                                          28.11.2007
+
+    *) Исправление: при использовании директивы proxy_pass c URI-частью в 
+       рабочем процессе мог произойти segmentation fault; ошибка появилась 
+       в 0.6.19.
+
+
 Изменения в nginx 0.6.19                                          27.11.2007
 
     *) Исправление: версия 0.6.18 не собиралась.
@@ -375,6 +382,193 @@
        поддерживают маски вида "www.example.*".
 
 
+Изменения в nginx 0.5.33                                          07.11.2007
+
+    *) Изменение: теперь по умолчанию команда SSI echo использует 
+       кодирование entity.
+
+    *) Добавление: параметр encoding в команде SSI echo.
+
+    *) Изменение: почтовый прокси-сервер разделён на три модуля: pop3, imap 
+       и smtp.
+
+    *) Добавление: параметры конфигурации --without-mail_pop3_module, 
+       --without-mail_imap_module и --without-mail_smtp_module.
+
+    *) Добавление: директивы smtp_greeting_delay и smtp_client_buffer 
+       модуля ngx_mail_smtp_module.
+
+    *) Добавление: директивы server_name и valid_referers поддерживают 
+       регулярные выражения.
+
+    *) Добавление: директивы "server_name", "map", and "valid_referers" 
+       поддерживают маски вида "www.example.*".
+
+    *) Исправление: sub_filter не работал с пустой строкой замены.
+
+    *) Исправление: в парсинге sub_filter.
+
+    *) Исправление: рабочий процесс мог зациклиться при использовании 
+       memcached.
+
+    *) Исправление: nginx распознавал параметры "close" и "keep-alive" в 
+       строке "Connection" в заголовке запроса только, если они были в 
+       нижнем регистре; ошибка появилась в 0.5.32.
+
+    *) Исправление: при использовании разделяемой библиотеки PCRE, 
+       расположенной в нестандартном месте, nginx не запускался на Solaris.
+
+
+Изменения в nginx 0.5.32                                          24.09.2007
+
+    *) Изменение: теперь nginx пытается установить директивы 
+       worker_priority, worker_rlimit_nofile, worker_rlimit_core, 
+       worker_rlimit_sigpending без привилегий root'а.
+
+    *) Изменение: теперь nginx экранирует символы пробела и "%" при 
+       передаче запроса серверу аутентификации почтового прокси-сервера.
+
+    *) Изменение: теперь nginx экранирует символ "%" в переменной 
+       $memcached_key.
+
+    *) Изменение: для обновления на лету версий 0.1.x создан специальный 
+       сценарий make upgrade1.
+
+    *) Добавление: директива "add_header Last-Modified ..." меняет строку 
+       "Last-Modified" в заголовке ответа.
+
+    *) Добавление: почтовый прокси-сервер поддерживает AUTHENTICATE в 
+       режиме IMAP.
+       Спасибо Максиму Дунину.
+
+    *) Добавление: почтовый прокси-сервер поддерживает STARTTLS в режиме 
+       SMTP.
+       Спасибо Максиму Дунину.
+
+    *) Исправление: nginx не закрывал файл каталога для запроса HEAD, если 
+       использовался autoindex
+       Спасибо Arkadiusz Patyk.
+
+    *) Исправление: директивы proxy_hide_header и fastcgi_hide_header не 
+       скрывали строки заголовка ответа с именем больше 32 символов.
+       Спасибо Manlio Perillo.
+
+    *) Исправление: счётчик активных соединений всегда рос при 
+       использовании почтового прокси-сервера.
+
+    *) Исправление: если бэкенд возвращал только заголовок ответа при 
+       небуферизированном проксировании, то nginx закрывал соединение с 
+       бэкендом по таймауту.
+
+    *) Исправление: nginx не поддерживал несколько строк "Connection" в 
+       заголовке запроса.
+
+    *) Исправление: В строку заголовка ответа "Content-Type", указанную в 
+       методе $r->send_http_header(), не добавлялась кодировка, указанная в 
+       директиве charset.
+
+    *) Исправление: при использовании метода /dev/poll в рабочем процессе 
+       мог произойти segmentation fault.
+
+    *) Исправление: nginx не работал на FreeBSD/sparc64.
+
+    *) Исправление: если в директиве auth_http был задан неправильный 
+       адрес, то в рабочем процессе происходил segmentation fault.
+
+    *) Исправление: теперь по умолчанию nginx использует значение 511 для 
+       listen backlog на всех платформах, кроме FreeBSD.
+       Спасибо Jiang Hong.
+
+    *) Исправление: sendfilev() в Solaris теперь не используется при 
+       передаче тела запроса FastCGI-серверу через unix domain сокет.
+
+    *) Исправление: при использовании одного хоста в качестве бэкендов для 
+       протоколов HTTP и HTTPS без явного указания портов, nginx 
+       использовал только один порт - 80 или 443.
+
+    *) Исправление: директивы proxy_ignore_client_abort и 
+       fastcgi_ignore_client_abort не работали; ошибка появилась в 0.5.13.
+
+
+Изменения в nginx 0.5.31                                          15.08.2007
+
+    *) Добавление: именованные location'ы.
+
+    *) Добавление: директивы proxy_store и fastcgi_store.
+
+    *) Добавление: директивы proxy_store_access и fastcgi_store_access.
+
+
+Изменения в nginx 0.5.30                                          30.07.2007
+
+    *) Добавление: переменную $args можно устанавливать с помощью set.
+
+    *) Добавление: переменная $is_args.
+
+    *) Исправление: если клиент в почтовом прокси-сервере закрывал 
+       соединение, то nginx мог не закрывать соединение с бэкендом.
+
+    *) Исправление: теперь nginx экранирует пробел в переменной 
+       $memcached_key.
+
+    *) Исправление: при использовании протокола HTTPS в директиве 
+       proxy_pass в рабочем процессе мог произойти segmentation fault.
+
+    *) Исправление: значение perl'овой переменной $$ модуля 
+       ngx_http_perl_module было равно номеру главного процесса.
+
+    *) Исправление: nginx не собирался на Solaris/amd64 Sun Studio 11 и 
+       более ранними версиями; ошибка появилась в 0.5.29.
+
+
+Изменения в nginx 0.5.29                                          23.07.2007
+
+    *) Добавление: переменная $nginx_version.
+       Спасибо Николаю Гречуху.
+
+    *) Исправление: если заголовок ответа был разделён в FastCGI-записях, 
+       то nginx передавал клиенту мусор в таких заголовках.
+
+    *) Исправление: совместимость с Sun Studio на Solaris/amd64 и 
+       Solaris/sparc64.
+       Спасибо Jiang Hong и Андрею Нигматулину.
+
+    *) Исправление: незначительных потенциальных ошибок.
+       Спасибо Coverity's Scan.
+
+
+Изменения в nginx 0.5.28                                          17.07.2007
+
+    *) Безопасность: при использовании директивы msie_refresh был возможен 
+       XSS.
+       Спасибо Максиму Богуку.
+
+    *) Исправление: при использовании директивы auth_http_header в рабочем 
+       процессе мог произойти segmentation fault.
+       Спасибо Максиму Дунину.
+
+    *) Исправление: если использовался метод аутентификации CRAM-MD5, но он 
+       не был разрешён, то в рабочем процессе происходил segmentation fault.
+
+    *) Исправление: в рабочем процессе мог произойти segmentation fault, 
+       если использовался метод eventport.
+
+
+Изменения в nginx 0.5.27                                          09.07.2007
+
+    *) Исправление: при использовании удалённого подзапроса в SSI 
+       последующий подзапрос локального файла мог отдаваться клиенту в 
+       неверном порядке.
+
+    *) Исправление: большие включения в SSI, сохранённые во временные 
+       файлы, передавались не полностью.
+
+
+Изменения в nginx 0.5.26                                          17.06.2007
+
+    *) Исправление: в парсинге SSI.
+
+
 Изменения в nginx 0.5.25                                          11.06.2007
 
     *) Исправление: nginx не собирался с параметром 
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VERSION      "0.6.19"
+#define NGINX_VERSION      "0.6.20"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -637,8 +637,6 @@ ngx_http_proxy_create_request(ngx_http_r
 
     plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module);
 
-    len = sizeof(ngx_http_proxy_version) - 1 + sizeof(CRLF) - 1;
-
     if (u->method.len) {
         /* HEAD was changed to GET to cache response */
         method = u->method;
@@ -652,6 +650,8 @@ ngx_http_proxy_create_request(ngx_http_r
         method.len++;
     }
 
+    len = method.len + sizeof(ngx_http_proxy_version) - 1 + sizeof(CRLF) - 1;
+
     escape = 0;
     loc_len = 0;
     unparsed_uri = 0;
@@ -659,12 +659,12 @@ ngx_http_proxy_create_request(ngx_http_r
     ctx = ngx_http_get_module_ctx(r, ngx_http_proxy_module);
 
     if (plcf->proxy_lengths) {
-        len += method.len + ctx->vars.uri.len;
+        len += ctx->vars.uri.len;
 
     } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main)
     {
         unparsed_uri = 1;
-        len += method.len + r->unparsed_uri.len;
+        len += r->unparsed_uri.len;
 
     } else {
         loc_len = (r->valid_location && ctx->vars.uri.len) ?
--- 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.6.19';
+our $VERSION = '0.6.20';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http.h
+++ b/src/http/ngx_http.h
@@ -114,9 +114,4 @@ extern ngx_http_output_header_filter_pt 
 extern ngx_http_output_body_filter_pt    ngx_http_top_body_filter;
 
 
-/* STUB */
-ngx_int_t ngx_http_log_handler(ngx_http_request_t *r);
-/**/
-
-
 #endif /* _NGX_HTTP_H_INCLUDED_ */