Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2446:32b945768dea
njs-0.3.6
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 22 Oct 2019 18:29:36 +0300 |
parents | 080581ce888d |
children | 2aa02672d54f |
comparison
equal
deleted
inserted
replaced
2445:192d136633b5 | 2446:32b945768dea |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="31"> | 12 rev="32"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
55 <para> | 55 <para> |
56 For example, the <literal>Foo</literal> header | 56 For example, the <literal>Foo</literal> header |
57 can be accessed with the syntax <literal>headersIn.foo</literal> | 57 can be accessed with the syntax <literal>headersIn.foo</literal> |
58 or <literal>headersIn['Foo']</literal> | 58 or <literal>headersIn['Foo']</literal> |
59 <note> | 59 <note> |
60 For headers that can appear multiple times such as | 60 Before version <link doc="changes.xml" id="njs0.3.6">0.3.6</link>, |
61 for headers that could appear multiple times such as | |
61 <header>Cookie</header> or <header>X-Forwarded-For</header>, | 62 <header>Cookie</header> or <header>X-Forwarded-For</header>, |
62 only the first value will be returned. | 63 only the first value was returned. |
63 To get all cookies, | 64 To get all cookies, |
64 <literal>r.variables.http_cookie</literal> | 65 <literal>r.variables.http_cookie</literal> |
65 should be used. | 66 should be used. |
66 To get the <literal>name</literal> cookie, | 67 To get the <literal>name</literal> cookie, |
67 <literal>r.variables["cookie_<value>name</value>"]</literal> | 68 <literal>r.variables["cookie_<value>name</value>"]</literal> |