Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5332:1a9700ef9725 | 5333:e8bca8397625 |
---|---|
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; |