summaryrefslogtreecommitdiff
path: root/src/core/ngx_output_chain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r--src/core/ngx_output_chain.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 71016996d..6d6d241c1 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -314,12 +314,11 @@ ngx_output_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
#endif
+ cl->next = NULL;
*ll = cl;
ll = &cl->next;
}
- *ll = NULL;
-
return NGX_OK;
}
@@ -503,6 +502,7 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx)
if (src->pos == src->last) {
dst->flush = src->flush;
dst->last_buf = src->last_buf;
+ dst->last_in_chain = src->last_in_chain;
}
} else {
@@ -577,6 +577,7 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx)
if (src->file_pos == src->file_last) {
dst->flush = src->flush;
dst->last_buf = src->last_buf;
+ dst->last_in_chain = src->last_in_chain;
}
}