ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Re: nginx-0.7.55



On Wed, May 06, 2009 at 03:13:59PM +0300, maxhl@xxxxxxxxxxxxxx wrote:
> Подскажите а можно заставить ngx_http_autoindex_module показывать директории
> начинающиеся с точки ? Типа .com .net? 

Патч в первом приближении.

--- src/http/modules/ngx_http_autoindex_module.c.orig   2009-05-06 
17:40:29.000000000 +0400
+++ src/http/modules/ngx_http_autoindex_module.c        2009-05-06 
17:45:14.000000000 +0400
@@ -269,10 +269,17 @@
 
         len = ngx_de_namelen(&dir);
 
-        if (ngx_de_name(&dir)[0] == '.') {
+        if (len == 1 && ngx_de_name(&dir)[0] == '.') {
             continue;
         }
 
+       if (len == 2
+           && ngx_de_name(&dir)[0] == '.'
+           && ngx_de_name(&dir)[1] == '.')
+       {
+           continue;
+       }
+
         if (!dir.valid_info) {
 
             /* 1 byte for '/' and 1 byte for terminating '\0' */


-- 
Sergey A. Osokin,
System Engineer,
Macomnet, Internet Dept.
tel: +7 (495) 796-9079
fax: +7 (495) 796-9067



 




Copyright © Lexa Software, 1996-2009.