diff src/http/modules/ngx_http_ssi_filter_module.c @ 2105:c5e8484b22ab stable-0.6

r2080 merge: 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, 07 Jul 2008 11:33:29 +0000
parents 9f15e5f8ff9e
children
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -558,8 +558,9 @@ ngx_http_ssi_body_filter(ngx_http_reques
                     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;