mirror of
https://github.com/nginx/nginx.git
synced 2025-07-31 18:46:15 +08:00
do not log misleading errno in "not a regular file" error
This commit is contained in:
parent
bfc8b78f57
commit
e003988f87
@ -180,7 +180,7 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r)
|
|||||||
#if !(NGX_WIN32) /* the not regular files are probably Unix specific */
|
#if !(NGX_WIN32) /* the not regular files are probably Unix specific */
|
||||||
|
|
||||||
if (!of.is_file) {
|
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);
|
"\"%s\" is not a regular file", path.data);
|
||||||
|
|
||||||
return NGX_HTTP_NOT_FOUND;
|
return NGX_HTTP_NOT_FOUND;
|
||||||
|
@ -189,7 +189,7 @@ ngx_http_static_handler(ngx_http_request_t *r)
|
|||||||
#if !(NGX_WIN32) /* the not regular files are probably Unix specific */
|
#if !(NGX_WIN32) /* the not regular files are probably Unix specific */
|
||||||
|
|
||||||
if (!of.is_file) {
|
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);
|
"\"%s\" is not a regular file", path.data);
|
||||||
|
|
||||||
return NGX_HTTP_NOT_FOUND;
|
return NGX_HTTP_NOT_FOUND;
|
||||||
|
Loading…
Reference in New Issue
Block a user