Skip to content

Commit 2a08467

Browse files
xeioexy82
authored andcommitted
Documented changes in the "js_body_filter" directive.
1 parent 476a1d6 commit 2a08467

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

xml/en/docs/http/ngx_http_js_module.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<module name="Module ngx_http_js_module"
1010
link="/en/docs/http/ngx_http_js_module.html"
1111
lang="en"
12-
rev="50">
12+
rev="51">
1313

1414
<section id="summary">
1515

@@ -173,6 +173,11 @@ the incoming data chunk,
173173
may be a string or Buffer
174174
depending on the <literal>buffer_type</literal> value,
175175
by default is a string.
176+
Since <link doc="../njs/changes.xml" id="njs0.8.5">0.8.5</link>, the
177+
<literal>data</literal> value is implicitly converted to a valid UTF-8 string
178+
by default.
179+
For binary data, the <literal>buffer_type</literal> value
180+
should be set to <literal>buffer</literal>.
176181
</tag-desc>
177182

178183
<tag-name><literal>flags</literal></tag-name>

xml/ru/docs/http/ngx_http_js_module.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<module name="Модуль ngx_http_js_module"
1010
link="/ru/docs/http/ngx_http_js_module.html"
1111
lang="ru"
12-
rev="50">
12+
rev="51">
1313

1414
<section id="summary">
1515

@@ -149,7 +149,7 @@ export default {foo, summary, baz, hello, fetch, hash};
149149

150150
<directive name="js_body_filter">
151151
<syntax><value>функция</value> | <value>модуль.функция</value>
152-
[<value>buffer_type</value>=<value>строка</value> | <value>буфер</value>]</syntax>
152+
[<value>buffer_type</value>=<value>string</value> | <value>buffer</value>]</syntax>
153153
<default/>
154154
<context>location</context>
155155
<context>if in location</context>
@@ -173,6 +173,11 @@ export default {foo, summary, baz, hello, fetch, hash};
173173
может быть строкой или буфером
174174
в зависимости от значения <literal>buffer_type</literal>,
175175
по умолчанию является строкой.
176+
Начиная с <link doc="../njs/changes.xml" id="njs0.8.5">0.8.5</link>,
177+
по умолчанию
178+
значение <literal>data</literal> неявно преобразуется в валидную строку UTF-8.
179+
Для бинарных данных параметр <literal>buffer_type</literal>
180+
необходимо установить в <literal>buffer</literal>.
176181
</tag-desc>
177182

178183
<tag-name><literal>flags</literal></tag-name>

0 commit comments

Comments
 (0)