From e8bb0121a1c1026a3b14a4f9bcc39a0d0e38c5fd Mon Sep 17 00:00:00 2001 From: Benoit Sigoure Date: Sun, 7 Mar 2010 21:06:35 -0800 Subject: [PATCH] Don't error out when a file can't be stat()ed. Whenever a directory contained a file that couldn't be stat()ed by nginx (e.g. due to EACCESS), the fancyindex module would produce an error and wouldn't generate any response to the user. The new behavior is to log a non-critical error and keep serving the page anyway. Signed-off-by: Benoit Sigoure --- ngx_http_fancyindex_module.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ngx_http_fancyindex_module.c b/ngx_http_fancyindex_module.c index 06e1a9a..a099fb2 100644 --- a/ngx_http_fancyindex_module.c +++ b/ngx_http_fancyindex_module.c @@ -397,9 +397,9 @@ make_content_buf( ngx_int_t err = ngx_errno; if (err != NGX_ENOENT) { - ngx_log_error(NGX_LOG_CRIT, r->connection->log, err, + ngx_log_error(NGX_LOG_ERR, r->connection->log, err, ngx_de_info_n " \"%s\" failed", filename); - return ngx_http_fancyindex_error(r, &dir, &path); + continue; } if (ngx_de_link_info(filename, &dir) == NGX_FILE_ERROR) { -- 1.7.0.2.157.gb7e7f