Mercurial > hg > nginx
comparison src/http/ngx_http_write_filter.c @ 402:f209f3391020
nginx-0.0.9-2004-07-28-20:16:50 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 28 Jul 2004 16:16:50 +0000 |
parents | 4e21d1291a14 |
children | ea3113b181d1 |
comparison
equal
deleted
inserted
replaced
401:b32ca005e025 | 402:f209f3391020 |
---|---|
38 | 38 |
39 | 39 |
40 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) | 40 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) |
41 { | 41 { |
42 int last; | 42 int last; |
43 off_t size, flush, sent; | 43 off_t size, flush, sent, bsize; |
44 ngx_chain_t *cl, *ln, **ll, *chain; | 44 ngx_chain_t *cl, *ln, **ll, *chain; |
45 ngx_connection_t *c; | 45 ngx_connection_t *c; |
46 ngx_http_core_loc_conf_t *clcf; | 46 ngx_http_core_loc_conf_t *clcf; |
47 ngx_http_write_filter_ctx_t *ctx; | 47 ngx_http_write_filter_ctx_t *ctx; |
48 | 48 |
80 for (ln = in; ln; ln = ln->next) { | 80 for (ln = in; ln; ln = ln->next) { |
81 ngx_alloc_link_and_set_buf(cl, ln->buf, r->pool, NGX_ERROR); | 81 ngx_alloc_link_and_set_buf(cl, ln->buf, r->pool, NGX_ERROR); |
82 *ll = cl; | 82 *ll = cl; |
83 ll = &cl->next; | 83 ll = &cl->next; |
84 | 84 |
85 size += ngx_buf_size(cl->buf); | 85 bsize = ngx_buf_size(cl->buf); |
86 | |
87 if (bsize == 0 && cl->buf->in_file) { | |
88 cl->buf->in_file = 0; | |
89 } | |
90 | |
91 size += bsize; | |
86 | 92 |
87 if (cl->buf->flush || cl->buf->recycled) { | 93 if (cl->buf->flush || cl->buf->recycled) { |
88 flush = size; | 94 flush = size; |
89 } | 95 } |
90 | 96 |