changeset 2118:0b3103eabdf1

Documented the "subrequest_output_buffer_size" directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 20 Mar 2018 21:03:28 +0300
parents 632fe2d874ab
children 732416bdc54e
files xml/en/docs/http/ngx_http_core_module.xml xml/en/docs/http/ngx_http_ssi_module.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_ssi_module.xml
diffstat 4 files changed, 84 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml
+++ b/xml/en/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="74">
+        rev="75">
 
 <section id="directives" name="Directives">
 
@@ -2570,6 +2570,32 @@ An empty string disables the emission of
 </directive>
 
 
+<directive name="subrequest_output_buffer_size">
+<syntax><value>size</value></syntax>
+<default>4k|8k</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.13.10</appeared-in>
+
+<para>
+Sets the <value>size</value> of the buffer used for
+storing the response body of a subrequest.
+By default, the buffer size is equal to one memory page.
+This is either 4K or 8K, depending on a platform.
+It can be made smaller, however.
+</para>
+
+<para>
+The directive is applicable only for subrequests
+with response bodies saved into memory.
+For example, such subrequests are created by
+<link doc="ngx_http_ssi_module.xml" id="ssi_include_set">SSI</link>.
+</para>
+
+</directive>
+
+
 <directive name="tcp_nodelay">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>on</default>
--- a/xml/en/docs/http/ngx_http_ssi_module.xml
+++ b/xml/en/docs/http/ngx_http_ssi_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_ssi_module"
         link="/en/docs/http/ngx_http_ssi_module.html"
         lang="en"
-        rev="8">
+        rev="9">
 
 <section id="summary">
 
@@ -358,7 +358,7 @@ complete before continuing with SSI proc
 </example>
 </tag-desc>
 
-<tag-name><literal>set</literal></tag-name>
+<tag-name id="ssi_include_set"><literal>set</literal></tag-name>
 <tag-desc>
 a non-standard parameter that instructs to write a successful result
 of request processing to the specified variable,
@@ -366,13 +366,25 @@ for example:
 <example>
 &lt;!--# include virtual="/remote/body.php?argument=value" set="one" --&gt;
 </example>
-It should be noted that only the results of responses obtained using the
+The maximum size of the response is set by the
+<link doc="ngx_http_core_module.xml" id="subrequest_output_buffer_size"/>
+value in the target location (1.13.10).
+<para>
+Prior to version 1.13.10, only the results of responses obtained using the
 <link doc="ngx_http_proxy_module.xml">ngx_http_proxy_module</link>,
 <link doc="ngx_http_memcached_module.xml">ngx_http_memcached_module</link>,
 <link doc="ngx_http_fastcgi_module.xml">ngx_http_fastcgi_module</link> (1.5.6),
 <link doc="ngx_http_uwsgi_module.xml">ngx_http_uwsgi_module</link> (1.5.6),
 and <link doc="ngx_http_scgi_module.xml">ngx_http_scgi_module</link> (1.5.6)
-modules can be written into variables.
+modules could be written into variables.
+The maximum size of the response was set with the
+<link doc="ngx_http_proxy_module.xml" id="proxy_buffer_size"/>,
+<link doc="ngx_http_memcached_module.xml" id="memcached_buffer_size"/>,
+<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_buffer_size"/>,
+<link doc="ngx_http_uwsgi_module.xml" id="uwsgi_buffer_size"/>,
+and <link doc="ngx_http_scgi_module.xml" id="scgi_buffer_size"/>
+directives.
+</para>
 </tag-desc>
 
 </list>
--- a/xml/ru/docs/http/ngx_http_core_module.xml
+++ b/xml/ru/docs/http/ngx_http_core_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_core_module"
         link="/ru/docs/http/ngx_http_core_module.html"
         lang="ru"
-        rev="74">
+        rev="75">
 
 <section id="directives" name="Директивы">
 
@@ -2573,6 +2573,32 @@ server {
 </directive>
 
 
+<directive name="subrequest_output_buffer_size">
+<syntax><value>размер</value></syntax>
+<default>4k|8k</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.13.10</appeared-in>
+
+<para>
+Задаёт <value>размер</value> буфера, используемого для
+хранения тела ответа подзапроса.
+По умолчанию размер одного буфера равен размеру страницы памяти.
+В зависимости от платформы это или 4K, или 8K,
+однако его можно сделать меньше.
+</para>
+
+<para>
+Директива применима только для подзапросов,
+тело ответа которых сохраняется в памяти.
+Например, подобные подзапросы создаются при помощи
+<link doc="ngx_http_ssi_module.xml" id="ssi_include_set">SSI</link>.
+</para>
+
+</directive>
+
+
 <directive name="tcp_nodelay">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>on</default>
--- a/xml/ru/docs/http/ngx_http_ssi_module.xml
+++ b/xml/ru/docs/http/ngx_http_ssi_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_ssi_module"
         link="/ru/docs/http/ngx_http_ssi_module.html"
         lang="ru"
-        rev="8">
+        rev="9">
 
 <section id="summary">
 
@@ -362,7 +362,7 @@ SSI, например:
 </example>
 </tag-desc>
 
-<tag-name><literal>set</literal></tag-name>
+<tag-name id="ssi_include_set"><literal>set</literal></tag-name>
 <tag-desc>
 нестандартный параметр, указывающий, что удачный
 результат выполнения запроса нужно записать в заданную переменную,
@@ -370,13 +370,24 @@ SSI, например:
 <example>
 &lt;!--# include virtual="/remote/body.php?argument=value" set="one" --&gt;
 </example>
-Необходимо учитывать, что в переменные можно записать только результаты
+Максимальный размер ответа задаётся значением
+<link doc="ngx_http_core_module.xml" id="subrequest_output_buffer_size"/>
+в целевом location (1.13.10).
+<para>
+До версии 1.13.10 в переменные можно было записать только результаты
 ответов, полученные через модули
 <link doc="ngx_http_proxy_module.xml">ngx_http_proxy_module</link>,
 <link doc="ngx_http_memcached_module.xml">ngx_http_memcached_module</link>,
 <link doc="ngx_http_fastcgi_module.xml">ngx_http_fastcgi_module</link> (1.5.6),
 <link doc="ngx_http_uwsgi_module.xml">ngx_http_uwsgi_module</link> (1.5.6)
 и <link doc="ngx_http_scgi_module.xml">ngx_http_scgi_module</link> (1.5.6).
+Максимальный размер ответа задавался при помощи директив
+<link doc="ngx_http_proxy_module.xml" id="proxy_buffer_size"/>,
+<link doc="ngx_http_memcached_module.xml" id="memcached_buffer_size"/>,
+<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_buffer_size"/>,
+<link doc="ngx_http_uwsgi_module.xml" id="uwsgi_buffer_size"/>
+и <link doc="ngx_http_scgi_module.xml" id="scgi_buffer_size"/>.
+</para>
 </tag-desc>
 
 </list>