Mercurial > hg > nginx
diff src/http/modules/ngx_http_fastcgi_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 | 3b635e8fd499 |
children | 06cf0c4b8618 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -2512,36 +2512,6 @@ ngx_http_fastcgi_non_buffered_filter(voi break; } - /* provide continuous buffer for subrequests in memory */ - - if (r->subrequest_in_memory) { - - cl = u->out_bufs; - - if (cl) { - buf->pos = cl->buf->pos; - } - - buf->last = buf->pos; - - for (cl = u->out_bufs; cl; cl = cl->next) { - ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "http fastcgi in memory %p-%p %O", - cl->buf->pos, cl->buf->last, ngx_buf_size(cl->buf)); - - if (buf->last == cl->buf->pos) { - buf->last = cl->buf->last; - continue; - } - - buf->last = ngx_movemem(buf->last, cl->buf->pos, - cl->buf->last - cl->buf->pos); - - cl->buf->pos = buf->last - (cl->buf->last - cl->buf->pos); - cl->buf->last = buf->last; - } - } - return NGX_OK; }