aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-11-20 17:02:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-11-20 17:02:02 +0000
commit7405d30f4f544aee24c074ef3747ab64763f6d6e (patch)
treee43123b8a0b8e6dc5ec1d44452a9ae46390a1006
parent4cbfcd7a99149092c09a88882410695191014847 (diff)
downloadnginx-7405d30f4f544aee24c074ef3747ab64763f6d6e.tar.gz
nginx-7405d30f4f544aee24c074ef3747ab64763f6d6e.zip
r2182 merge:
ignore NGX_EACCES error while directory test
-rw-r--r--src/http/modules/ngx_http_index_module.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c
index 6bfb04565..01e6cd59a 100644
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -306,6 +306,19 @@ ngx_http_index_test_dir(ngx_http_request_t *r, ngx_http_core_loc_conf_t *clcf,
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);
}