[PATCH] Don't print misleading errno in "not a regular file" error
Maxim Dounin
mdounin at mdounin.ru
Sun Apr 18 22:54:26 MSD 2010
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1270333708 -14400
# Node ID a78f3d22264859766f51e50595ad66805029e24d
# Parent a49f5d0aff01a425251d262fbe564790b4b30d4f
Don't print 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;
More information about the nginx-devel
mailing list