# HG changeset patch # User Igor Sysoev # Date 1227200522 0 # Node ID 2577098d65ac3606b9820d7c96230c70d2b1ca7f # Parent 3a00188e49c555b2897dcce9474bc0bb59acb8d0 r2182 merge: ignore NGX_EACCES error while directory test diff -r 3a00188e49c5 -r 2577098d65ac src/http/modules/ngx_http_index_module.c --- 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); }