diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-07-28 16:16:50 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-28 16:16:50 +0000 |
| commit | 5ec68f6453a0ed164a8fd73e024edb75344e967d (patch) | |
| tree | ac4574649ce9fe5beb4fc9946fb4a56fffaacc99 /src/http | |
| parent | 71cb18335671b5e6d46ee1eb6b2f6bb67598f6c5 (diff) | |
| download | nginx-5ec68f6453a0ed164a8fd73e024edb75344e967d.tar.gz nginx-5ec68f6453a0ed164a8fd73e024edb75344e967d.tar.bz2 | |
nginx-0.0.9-2004-07-28-20:16:50 import
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/ngx_http_write_filter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index 2c0989d0a..c6cc6519a 100644 --- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c @@ -40,7 +40,7 @@ ngx_module_t ngx_http_write_filter_module = { ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) { int last; - off_t size, flush, sent; + off_t size, flush, sent, bsize; ngx_chain_t *cl, *ln, **ll, *chain; ngx_connection_t *c; ngx_http_core_loc_conf_t *clcf; @@ -82,7 +82,13 @@ ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) *ll = cl; ll = &cl->next; - size += ngx_buf_size(cl->buf); + bsize = ngx_buf_size(cl->buf); + + if (bsize == 0 && cl->buf->in_file) { + cl->buf->in_file = 0; + } + + size += bsize; if (cl->buf->flush || cl->buf->recycled) { flush = size; |
