changeset 338:cac46d125dc7 NGINX_0_6_13

nginx 0.6.13 *) Bugfix: nginx did not close directory file on HEAD request if autoindex was used. Thanks to Arkadiusz Patyk.
author Igor Sysoev <http://sysoev.ru>
date Mon, 24 Sep 2007 00:00:00 +0400
parents b3475df8722a
children d19550b67059
files CHANGES CHANGES.ru auto/options src/core/nginx.h src/http/modules/ngx_http_autoindex_module.c src/http/modules/perl/nginx.pm
diffstat 6 files changed, 25 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,11 @@
 
+Changes with nginx 0.6.13                                        24 Sep 2007
+
+    *) Bugfix: nginx did not close directory file on HEAD request if 
+       autoindex was used.
+       Thanks to Arkadiusz Patyk.
+
+
 Changes with nginx 0.6.12                                        21 Sep 2007
 
     *) Change: mail proxy was split on three modules: pop3, imap and smtp.
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,11 @@
 
+Изменения в nginx 0.6.13                                          24.09.2007
+
+    *) Исправление: nginx не закрывал файл каталога для запроса HEAD, если 
+       использовался autoindex
+       Спасибо Arkadiusz Patyk.
+
+
 Изменения в nginx 0.6.12                                          21.09.2007
 
     *) Изменение: почтовый прокси-сервер разделён на три модуля: pop3, imap 
--- a/auto/options
+++ b/auto/options
@@ -308,8 +308,11 @@ cat << END
 
   --without-http                     disable HTTP server
 
-  --with-mail                        enable IMAP4/POP3/SMTP proxy module
+  --with-mail                        enable POP3/IMAP4/SMTP proxy module
   --with-mail_ssl_module             enable ngx_mail_ssl_module
+  --without-mail_pop3_module         disable ngx_mail_pop3_module
+  --without-mail_imap_module         disable ngx_mail_imap_module
+  --without-mail_smtp_module         disable ngx_mail_smtp_module
 
   --add-module=PATH                  enable an external module
 
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VERSION      "0.6.12"
+#define NGINX_VERSION      "0.6.13"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/http/modules/ngx_http_autoindex_module.c
+++ b/src/http/modules/ngx_http_autoindex_module.c
@@ -236,6 +236,11 @@ ngx_http_autoindex_handler(ngx_http_requ
     rc = ngx_http_send_header(r);
 
     if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
+        if (ngx_close_dir(&dir) == NGX_ERROR) {
+            ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno,
+                          ngx_close_dir_n " \"%V\" failed", &path);
+        }
+
         return rc;
     }
 
--- 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.12';
+our $VERSION = '0.6.13';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);