diff options
Diffstat (limited to 'src/core/ngx_output_chain.c')
| -rw-r--r-- | src/core/ngx_output_chain.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index cc635c9a9..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; } } @@ -444,8 +446,9 @@ ngx_chain_writer(void *data, ngx_chain_t *in) size += ngx_buf_size(in->buf); - ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, - "chain writer buf size: %uO", ngx_buf_size(in->buf)); + ngx_log_debug2(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, + "chain writer buf fl:%d s:%uO", + in->buf->flush, ngx_buf_size(in->buf)); cl = ngx_alloc_chain_link(ctx->pool); if (cl == NULL) { |
