# HG changeset patch # User Yaroslav Zhuravlev # Date 1570448476 -10800 # Node ID 080581ce888d2f287e961d724b44ade806d667da # Parent 7a353370ffcd865ea81c78558b89b5aa6c6858cc Added note to r.headersIn in njs Reference. diff -r 7a353370ffcd -r 080581ce888d xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Thu Oct 03 19:39:57 2019 +0300 +++ b/xml/en/docs/njs/reference.xml Mon Oct 07 14:41:16 2019 +0300 @@ -9,7 +9,7 @@
+ rev="31">
@@ -56,6 +56,17 @@ For example, the Foo header can be accessed with the syntax headersIn.foo or headersIn['Foo'] + +For headers that can appear multiple times such as +
Cookie
or
X-Forwarded-For
, +only the first value will be returned. +To get all cookies, +r.variables.http_cookie +should be used. +To get the name cookie, +r.variables["cookie_name"] +should be used. +
diff -r 7a353370ffcd -r 080581ce888d xml/ru/docs/njs/reference.xml --- a/xml/ru/docs/njs/reference.xml Thu Oct 03 19:39:57 2019 +0300 +++ b/xml/ru/docs/njs/reference.xml Mon Oct 07 14:41:16 2019 +0300 @@ -57,6 +57,17 @@ Например, доступ к заголовку Foo можно получить при помощи синтаксиса headersIn.foo или headersIn['Foo'] + +Если заголовок может быть указан несколько раз, например +
Cookie
или
X-Forwarded-For
, +будет возвращено только первое значение. +Чтобы получить все cookie +необходимо использовать +r.variables.http_cookie. +Чтобы получить имя cookie +необходимо использовать +r.variables["cookie_имя"]. +