Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_chunked_filter.c')
-rw-r--r--src/http/modules/ngx_http_chunked_filter.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_chunked_filter.c b/src/http/modules/ngx_http_chunked_filter.c
index a71839a29..211246149 100644
--- a/src/http/modules/ngx_http_chunked_filter.c
+++ b/src/http/modules/ngx_http_chunked_filter.c
@@ -83,10 +83,12 @@ static ngx_int_t ngx_http_chunked_body_filter(ngx_http_request_t *r,
size += ngx_buf_size(cl->buf);
- ngx_test_null(tl, ngx_alloc_chain_link(r->pool), NGX_ERROR);
- tl->buf = cl->buf;
- *ll = tl;
- ll = &tl->next;
+ if (cl->buf->flush || ngx_buf_in_memory(cl->buf) || cl->buf->in_file) {
+ ngx_test_null(tl, ngx_alloc_chain_link(r->pool), NGX_ERROR);
+ tl->buf = cl->buf;
+ *ll = tl;
+ ll = &tl->next;
+ }
if (cl->next == NULL) {
break;