diff src/http/modules/ngx_http_autoindex_module.c @ 5333:e8bca8397625

Autoindex: improved ngx_de_info() error handling. This allows to build a directory listing whenever a loop exists in symbolic link resolution of the path argument.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 30 Jul 2013 11:43:21 +0400
parents 1a9700ef9725
children 2cfc095a607a
line wrap: on
line diff
--- a/src/http/modules/ngx_http_autoindex_module.c
+++ b/src/http/modules/ngx_http_autoindex_module.c
@@ -304,7 +304,7 @@ ngx_http_autoindex_handler(ngx_http_requ
             if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) {
                 err = ngx_errno;
 
-                if (err != NGX_ENOENT) {
+                if (err != NGX_ENOENT && err != NGX_ELOOP) {
                     ngx_log_error(NGX_LOG_CRIT, r->connection->log, err,
                                   ngx_de_info_n " \"%s\" failed", filename);