Mercurial > hg > nginx
diff src/http/modules/ngx_http_ssi_filter_module.c @ 7220:20f139e9ffa8
Generic subrequests in memory.
Previously, only the upstream response body could be accessed with the
NGX_HTTP_SUBREQUEST_IN_MEMORY feature. Now any response body from a subrequest
can be saved in a memory buffer. It is available as a single buffer in r->out
and the buffer size is configured by the subrequest_output_buffer_size
directive.
Upstream, proxy and fastcgi code used to handle the old-style feature is
removed.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 28 Feb 2018 16:56:58 +0300 |
parents | 32f83fe5747b |
children | d75153522557 |
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 @@ -2231,9 +2231,11 @@ ngx_http_ssi_set_variable(ngx_http_reque { ngx_str_t *value = data; - if (r->upstream) { - value->len = r->upstream->buffer.last - r->upstream->buffer.pos; - value->data = r->upstream->buffer.pos; + if (r->headers_out.status < NGX_HTTP_SPECIAL_RESPONSE + && r->out && r->out->buf) + { + value->len = r->out->buf->last - r->out->buf->pos; + value->data = r->out->buf->pos; } return rc;