aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-17 17:38:48 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-08-17 17:38:48 +0000
commita03bb0bc77224dc88bddcc86a4c8b98c6bee4a6a (patch)
tree035e49ba1882397e8b0205aee293755fb4c3d9a5 /src
parentb17e33293affc50d5b011684877ca5674d9c6fc5 (diff)
downloadnginx-a03bb0bc77224dc88bddcc86a4c8b98c6bee4a6a.tar.gz
nginx-a03bb0bc77224dc88bddcc86a4c8b98c6bee4a6a.zip
ignore NGX_EACCES error while directory test
Diffstat (limited to 'src')
-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 a03b9f62e..434ae60c5 100644
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -309,6 +309,19 @@ ngx_http_index_test_dir(ngx_http_request_t *r, ngx_http_core_loc_conf_t *clcf,
return ngx_http_index_error(r, clcf, 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);
}