Mercurial > hg > nginx
changeset 2321:2577098d65ac stable-0.6
r2182 merge:
ignore NGX_EACCES error while directory test
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Nov 2008 17:02:02 +0000 |
parents | 3a00188e49c5 |
children | d4df1c875351 |
files | src/http/modules/ngx_http_index_module.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_index_module.c Thu Nov 20 16:58:41 2008 +0000 +++ b/src/http/modules/ngx_http_index_module.c Thu Nov 20 17:02:02 2008 +0000 @@ -306,6 +306,19 @@ return ngx_http_index_error(r, dir.data, NGX_ENOENT); } + if (of.err == NGX_EACCES) { + + *last = c; + + /* + * ngx_http_index_test_dir() is called after the first index + * file testing has returned an error distinct from NGX_EACCES. + * This means that directory searching is allowed. + */ + + return NGX_OK; + } + ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, ngx_open_file_n " \"%s\" failed", dir.data); }