Maxim Dounin
April 18, 2010 02:56PM
# HG changeset patch
# User Maxim Dounin <mdounin@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;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Don't print misleading errno in "not a regular file" error

Maxim Dounin 3945 April 18, 2010 02:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready