# HG changeset patch # User Yaroslav Zhuravlev # Date 1589897149 -3600 # Node ID 33347df1da9cc61f94210e8e1e61ba654b01db8f # Parent f39c4724c0f8f4156d6321f6cace916bbb3dfd25 Relocated sentence in r.headers.Out, added dot, corrected quotes. diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="42">
@@ -100,7 +100,7 @@ Field values of multi-value response hea (0.4.0) can be set with the syntax: -r.headersOut[‘Foo’] = [‘a’, ‘b’] +r.headersOut['Foo'] = ['a', 'b'] where the output will be: @@ -116,6 +116,8 @@ For standard response headers that accept only a single field value such as
Content-Type
, only the last element of the array will take effect. +Field values of the
Set-Cookie
response header +are always returned as an array. Duplicate field values in
Age
,
Content-Encoding
, @@ -129,8 +131,6 @@ Duplicate field values in response headers are ignored. Duplicate field values in all other response headers are separated by commas. -Field values of the
Set-Cookie
response header -are always returned as an array. diff --git a/xml/ru/docs/njs/reference.xml b/xml/ru/docs/njs/reference.xml --- a/xml/ru/docs/njs/reference.xml +++ b/xml/ru/docs/njs/reference.xml @@ -94,7 +94,7 @@ Доступ к заголовку ответа Foo можно получить при помощи синтаксиса: -headersOut.foo или headersOut['Foo'] +headersOut.foo или headersOut['Foo']. @@ -102,7 +102,7 @@ (0.4.0) можно задать при помощи синтаксиса: -r.headersOut[‘Foo’] = [‘a’, ‘b’] +r.headersOut['Foo'] = ['a', 'b'] результат: @@ -118,6 +118,8 @@ Foo: b поля которых могут принимать только одно значение, например
Content-Type
, учитывается только последний элемент массива. +Значения поля в заголовке ответа
Set-Cookie
+всегда возвращаются в виде массива. Дубликаты значений поля в заголовках ответа
Age
,
Content-Encoding
, @@ -131,8 +133,6 @@ Foo: b игнорируются. Дубликаты значений поля в других заголовках ответов разделяются при помощи запятой. -Значения поля в заголовке ответа
Set-Cookie
-всегда возвращаются в виде массива.