summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_output_chain.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-07-28 16:16:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-07-28 16:16:50 +0000
commit5ec68f6453a0ed164a8fd73e024edb75344e967d (patch)
treeac4574649ce9fe5beb4fc9946fb4a56fffaacc99 /src/core/ngx_output_chain.c
parent71cb18335671b5e6d46ee1eb6b2f6bb67598f6c5 (diff)
downloadnginx-5ec68f6453a0ed164a8fd73e024edb75344e967d.tar.gz
nginx-5ec68f6453a0ed164a8fd73e024edb75344e967d.tar.bz2
nginx-0.0.9-2004-07-28-20:16:50 import
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r--src/core/ngx_output_chain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 02d780f37..549c9ad16 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -73,6 +73,13 @@ ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
continue;
}
+ bsize = ngx_buf_size(ctx->in->buf);
+
+ if (bsize == 0) {
+ ctx->in = ctx->in->next;
+ continue;
+ }
+
if (ctx->buf == NULL) {
/* get the free buf */
@@ -91,8 +98,6 @@ ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
if (ctx->in->buf->last_buf) {
- bsize = ngx_buf_size(ctx->in->buf);
-
if (bsize < ctx->bufs.size) {
/*