changeset 3147:cbb1add4a6fe

fail if file size was changed
author Igor Sysoev <igor@sysoev.ru>
date Tue, 22 Sep 2009 09:44:57 +0000
parents 29ba1de1ab0b
children 52163a1027c3
files src/core/ngx_output_chain.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -571,9 +571,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;