mirror of
https://github.com/nginx/nginx.git
synced 2025-07-31 18:46:15 +08:00
r2080 merge:
fix error when response parsed by sub filter, then by SSI filter and some response parts are output as file buffers
This commit is contained in:
parent
5bba35d25b
commit
04400e9881
@ -558,8 +558,9 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
if (b->in_file) {
|
if (b->in_file) {
|
||||||
if (slcf->min_file_chunk < (size_t) (b->last - b->pos))
|
if (slcf->min_file_chunk < (size_t) (b->last - b->pos))
|
||||||
{
|
{
|
||||||
b->file_last = b->file_pos + (b->last - b->start);
|
b->file_last = b->file_pos
|
||||||
b->file_pos += b->pos - b->start;
|
+ (b->last - ctx->buf->pos);
|
||||||
|
b->file_pos += b->pos - ctx->buf->pos;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
b->in_file = 0;
|
b->in_file = 0;
|
||||||
|
@ -322,8 +322,8 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
b->recycled = 0;
|
b->recycled = 0;
|
||||||
|
|
||||||
if (b->in_file) {
|
if (b->in_file) {
|
||||||
b->file_last = b->file_pos + (b->last - b->start);
|
b->file_last = b->file_pos + (b->last - ctx->buf->pos);
|
||||||
b->file_pos += b->pos - b->start;
|
b->file_pos += b->pos - ctx->buf->pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl->next = NULL;
|
cl->next = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user