changeset 3498:9f20a6e758c3

do not log misleading errno in "not a regular file" error
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Apr 2010 16:01:52 +0000
parents ac281bc4c187
children b4a14d50388b
files src/http/modules/ngx_http_gzip_static_module.c src/http/modules/ngx_http_static_module.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_static_module.c
+++ b/src/http/modules/ngx_http_gzip_static_module.c
@@ -180,7 +180,7 @@ ngx_http_gzip_static_handler(ngx_http_re
 #if !(NGX_WIN32) /* the not regular files are probably Unix specific */
 
     if (!of.is_file) {
-        ngx_log_error(NGX_LOG_CRIT, log, ngx_errno,
+        ngx_log_error(NGX_LOG_CRIT, log, 0,
                       "\"%s\" is not a regular file", path.data);
 
         return NGX_HTTP_NOT_FOUND;
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -189,7 +189,7 @@ ngx_http_static_handler(ngx_http_request
 #if !(NGX_WIN32) /* the not regular files are probably Unix specific */
 
     if (!of.is_file) {
-        ngx_log_error(NGX_LOG_CRIT, log, ngx_errno,
+        ngx_log_error(NGX_LOG_CRIT, log, 0,
                       "\"%s\" is not a regular file", path.data);
 
         return NGX_HTTP_NOT_FOUND;