diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-07-07 12:01:35 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-07-07 12:01:35 +0000 |
commit | 04400e988157ce71a1699a919215dfea6d0f5187 (patch) | |
tree | 0b9f82970459d8522776ad76bbccc6f0b5d1e9bf | |
parent | 5bba35d25b56a7d77ba4815737174aea66541313 (diff) | |
download | nginx-04400e988157ce71a1699a919215dfea6d0f5187.tar.gz |
r2080 merge:
fix error when response parsed by sub filter, then by SSI filter
and some response parts are output as file buffers
-rw-r--r-- | src/http/modules/ngx_http_ssi_filter_module.c | 5 | ||||
-rw-r--r-- | src/http/modules/ngx_http_sub_filter_module.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index 5f01bb522..2a0e99fa4 100644 --- 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_request_t *r, ngx_chain_t *in) 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; diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c index 663a9f5b7..9b4df2e7a 100644 --- a/src/http/modules/ngx_http_sub_filter_module.c +++ b/src/http/modules/ngx_http_sub_filter_module.c @@ -322,8 +322,8 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in) 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; |