Mercurial > hg > nginx
changeset 2079:333ef9e18a59
fix error when response parsed by sub filter, then by SSI filter
and some response parts are output as file buffers
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 30 Jun 2008 19:10:06 +0000 |
parents | 9acbc5e7bcbd |
children | a24c7009de0b |
files | src/http/modules/ngx_http_ssi_filter_module.c src/http/modules/ngx_http_sub_filter_module.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssi_filter_module.c Mon Jun 30 15:51:28 2008 +0000 +++ b/src/http/modules/ngx_http_ssi_filter_module.c Mon Jun 30 19:10:06 2008 +0000 @@ -558,8 +558,9 @@ if (b->in_file) { if (slcf->min_file_chunk < (size_t) (b->last - b->pos)) { - b->file_last = b->file_pos + (b->last - b->start); - b->file_pos += b->pos - b->start; + b->file_last = b->file_pos + + (b->last - ctx->buf->pos); + b->file_pos += b->pos - ctx->buf->pos; } else { b->in_file = 0;
--- a/src/http/modules/ngx_http_sub_filter_module.c Mon Jun 30 15:51:28 2008 +0000 +++ b/src/http/modules/ngx_http_sub_filter_module.c Mon Jun 30 19:10:06 2008 +0000 @@ -322,8 +322,8 @@ b->recycled = 0; if (b->in_file) { - b->file_last = b->file_pos + (b->last - b->start); - b->file_pos += b->pos - b->start; + b->file_last = b->file_pos + (b->last - ctx->buf->pos); + b->file_pos += b->pos - ctx->buf->pos; } cl->next = NULL;