Mercurial > hg > nginx-quic
changeset 3429:9ecd253fcc90 stable-0.7
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
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 14:31:26 +0000 |
parents | 62f5fb57bbc1 |
children | 966f9cf9c7da |
files | src/core/ngx_connection.c src/core/ngx_output_chain.c src/http/modules/ngx_http_index_module.c src/http/ngx_http_core_module.c src/http/ngx_http_script.c |
diffstat | 5 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -917,12 +917,8 @@ ngx_connection_error(ngx_connection_t *c level = NGX_LOG_INFO; break; - case NGX_ERROR_ERR: + default: level = NGX_LOG_ERR; - break; - - default: - level = NGX_LOG_ALERT; } } else {
--- 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_cha 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;
--- 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_ 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); }
--- 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_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); }
--- 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_scrip 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); }