diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-06-15 09:02:09 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-06-15 09:02:09 +0000 |
| commit | 9371a7a493de284d94ce94e1a6147f6fc9e3d393 (patch) | |
| tree | a156944b876f6211e3c4f99c4c8a03e5be01897f /src | |
| parent | 253ec6a8952aa3be5b26c2b36a8411700b933ff2 (diff) | |
| download | nginx-9371a7a493de284d94ce94e1a6147f6fc9e3d393.tar.gz nginx-9371a7a493de284d94ce94e1a6147f6fc9e3d393.tar.bz2 | |
merge r2900:
fix XSLT filter in SSI subrequests
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/ngx_output_chain.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_xslt_filter_module.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 71016996d..ee23e8fe1 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -503,6 +503,7 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx) if (src->pos == src->last) { dst->flush = src->flush; dst->last_buf = src->last_buf; + dst->last_in_chain = src->last_in_chain; } } else { @@ -577,6 +578,7 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx) if (src->file_pos == src->file_last) { dst->flush = src->flush; dst->last_buf = src->last_buf; + dst->last_in_chain = src->last_in_chain; } } diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c index 9703b50ae..ab3118f78 100644 --- a/src/http/modules/ngx_http_xslt_filter_module.c +++ b/src/http/modules/ngx_http_xslt_filter_module.c @@ -280,7 +280,7 @@ ngx_http_xslt_body_filter(ngx_http_request_t *r, ngx_chain_t *in) return ngx_http_xslt_send(r, ctx, NULL); } - if (cl->buf->last_buf) { + if (cl->buf->last_buf || cl->buf->last_in_chain) { ctx->doc = ctx->ctxt->myDoc; @@ -427,8 +427,8 @@ ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx, ctx->request = r; } - err = xmlParseChunk(ctx->ctxt, (char *) b->pos, - (int) (b->last - b->pos), b->last_buf); + err = xmlParseChunk(ctx->ctxt, (char *) b->pos, (int) (b->last - b->pos), + (b->last_buf) || (b->last_in_chain)); if (err == 0) { b->pos = b->last; @@ -812,7 +812,6 @@ ngx_http_xslt_apply_stylesheet(ngx_http_request_t *r, b->pos = buf; b->last = buf + len; b->memory = 1; - b->last_buf = 1; if (encoding) { r->headers_out.charset.len = ngx_strlen(encoding); @@ -823,6 +822,8 @@ ngx_http_xslt_apply_stylesheet(ngx_http_request_t *r, return b; } + b->last_buf = 1; + if (type) { len = ngx_strlen(type); |
