aboutsummaryrefslogtreecommitdiff
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 554fe1b15..6bb463a83 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -377,8 +377,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, ngx_uint_t sendfile)
dst->in_file = 0;
}
- if (src->last_buf && src->pos == src->last) {
- dst->last_buf = 1;
+ if (src->pos == src->last) {
+ dst->flush = src->flush;
+ dst->last_buf = src->last_buf;
}
} else {
@@ -417,8 +418,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, ngx_uint_t sendfile)
src->file_pos += n;
- if (src->last_buf && src->file_pos == src->file_last) {
- dst->last_buf = 1;
+ if (src->pos == src->last) {
+ dst->flush = src->flush;
+ dst->last_buf = src->last_buf;
}
}