Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-06-30 23:10:06 +0400
committerIgor Sysoev <igor@sysoev.ru>2008-06-30 23:10:06 +0400
commit098ac90bc8d843391eed56d3a73844ce76df1832 (patch)
tree67dc9c4d2c2c091f677593e6945480052d496da9 /src
parent0da6d2f67585b405f11f6657a230b75729d1f7aa (diff)
fix error when response parsed by sub filter, then by SSI filter
and some response parts are output as file buffers
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c5
-rw-r--r--src/http/modules/ngx_http_sub_filter_module.c4
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 a855868c4..d8fc8f3fc 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 6a9bb1c59..e45ca6e49 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;