]> git.kaiwu.me - nginx.git/commitdiff
fail if file size was changed
authorIgor Sysoev <igor@sysoev.ru>
Tue, 22 Sep 2009 09:44:57 +0000 (09:44 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 22 Sep 2009 09:44:57 +0000 (09:44 +0000)
src/core/ngx_output_chain.c

index 01f42a191e7f7b3da450976d0db5908402bfe59e..590da4f450c716a79339195b5a166ad3fc53f31d 100644 (file)
@@ -571,9 +571,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;