summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-02-01 14:31:26 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-02-01 14:31:26 +0000
commit987f1e5fcc2949cff76608910514b0ed82400f8f (patch)
tree40cc339f306e1683b667bce11f241761a7e3c929
parentd23a26796472ebcf3d161cd7b81fee18df3c1a0b (diff)
downloadnginx-987f1e5fcc2949cff76608910514b0ed82400f8f.tar.gz
nginx-987f1e5fcc2949cff76608910514b0ed82400f8f.tar.bz2
merge r3148, r3152, r3161:
error processing fixes: *) fail if file size was changed *) low default connection errors level from alert to error *) low ENAMETOOLONG logging level
-rw-r--r--src/core/ngx_connection.c6
-rw-r--r--src/core/ngx_output_chain.c4
-rw-r--r--src/http/modules/ngx_http_index_module.c5
-rw-r--r--src/http/ngx_http_core_module.c5
-rw-r--r--src/http/ngx_http_script.c5
5 files changed, 14 insertions, 11 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 0a7fe847d..01c205877 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -917,12 +917,8 @@ ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text)
level = NGX_LOG_INFO;
break;
- case NGX_ERROR_ERR:
- level = NGX_LOG_ERR;
- break;
-
default:
- level = NGX_LOG_ALERT;
+ level = NGX_LOG_ERR;
}
} else {
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 6d6d241c1..bee7952ca 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -555,9 +555,7 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx)
ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0,
ngx_read_file_n " read only %z of %O from \"%s\"",
n, size, src->file->name.data);
- if (n == 0) {
- return NGX_ERROR;
- }
+ return NGX_ERROR;
}
dst->last += n;
diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c
index d94fc118c..b58aa97c2 100644
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -222,7 +222,10 @@ ngx_http_index_handler(ngx_http_request_t *r)
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- if (of.err == NGX_ENOTDIR || of.err == NGX_EACCES) {
+ if (of.err == NGX_ENOTDIR
+ || of.err == NGX_ENAMETOOLONG
+ || of.err == NGX_EACCES)
+ {
return ngx_http_index_error(r, clcf, path.data, of.err);
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 33a8d5895..6159e9213 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1199,7 +1199,10 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)
{
- if (of.err != NGX_ENOENT && of.err != NGX_ENOTDIR) {
+ if (of.err != NGX_ENOENT
+ && of.err != NGX_ENOTDIR
+ && of.err != NGX_ENAMETOOLONG)
+ {
ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err,
"%s \"%s\" failed", of.failed, path.data);
}
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index ad9d88b40..a92b1995a 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -1417,7 +1417,10 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e)
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)
{
- if (of.err != NGX_ENOENT && of.err != NGX_ENOTDIR) {
+ if (of.err != NGX_ENOENT
+ && of.err != NGX_ENOTDIR
+ && of.err != NGX_ENAMETOOLONG)
+ {
ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err,
"%s \"%s\" failed", of.failed, value->data);
}