nginx-0.0.7-2004-06-21-19:59:32 import
diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h
index 301d8f7..1927ed4 100644
--- a/src/core/ngx_buf.h
+++ b/src/core/ngx_buf.h
@@ -127,6 +127,7 @@
     ngx_chain_t                **last;
     ngx_connection_t            *connection;
     ngx_pool_t                  *pool;
+    off_t                        limit;
 } ngx_chain_writer_ctx_t;
 
 
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 7ab202c..aea6219 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -274,7 +274,7 @@
     ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
                    "WRITER0: %X", ctx->out);
 
-    ctx->out = ngx_write_chain(ctx->connection, ctx->out);
+    ctx->out = ngx_write_chain(ctx->connection, ctx->out, ctx->limit);
 
     ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
                    "WRITER1: %X", ctx->out);