comparison src/http/modules/ngx_http_autoindex_module.c @ 5415:f7e8e6bd5379 stable-1.4

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 5fa350899fe0
children
comparison
equal deleted inserted replaced
5414:5fa350899fe0 5415:f7e8e6bd5379
302 ngx_cpystrn(last, ngx_de_name(&dir), len + 1); 302 ngx_cpystrn(last, ngx_de_name(&dir), len + 1);
303 303
304 if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) { 304 if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) {
305 err = ngx_errno; 305 err = ngx_errno;
306 306
307 if (err != NGX_ENOENT) { 307 if (err != NGX_ENOENT && err != NGX_ELOOP) {
308 ngx_log_error(NGX_LOG_CRIT, r->connection->log, err, 308 ngx_log_error(NGX_LOG_CRIT, r->connection->log, err,
309 ngx_de_info_n " \"%s\" failed", filename); 309 ngx_de_info_n " \"%s\" failed", filename);
310 310
311 if (err == NGX_EACCES) { 311 if (err == NGX_EACCES) {
312 continue; 312 continue;