# HG changeset patch # User Igor Sysoev # Date 1271865712 0 # Node ID 9f20a6e758c3f258310cb2fc8ec6df15a534f92c # Parent ac281bc4c187f5b984eaf170b10b9eb2d7783fe2 do not log misleading errno in "not a regular file" error diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c --- 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; diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c --- 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;