diff options
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r-- | src/core/ngx_output_chain.c | 9 |
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) { /* |