Permalink
Browse files

Merge branch 'master' into no-postpone

  • Loading branch information...
2 parents 46aa878 + e775495 commit 8f6fab62187cf978f9668dfa03af90c67f377ab0 @agentzh agentzh committed May 27, 2012
Showing with 51 additions and 32 deletions.
  1. +23 −10 README
  2. +21 −11 README.markdown
  3. +7 −11 doc/HttpLuaModule.wiki
View
@@ -1756,7 +1756,7 @@ Nginx API for Lua
See also ngx.req.set_uri.
ngx.req.get_uri_args
- syntax: *args = ngx.req.get_uri_args(count_limit?)*
+ syntax: *args = ngx.req.get_uri_args(max_args?)*
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
header_filter_by_lua**
@@ -1822,7 +1822,7 @@ Nginx API for Lua
arguments are silently discarded to guard against potential denial of
service attacks.
- However, the optional "count_limit" function argument can be used to
+ However, the optional "max_args" function argument can be used to
override this limit:
local args = ngx.req.get_uri_args(10)
@@ -1832,10 +1832,10 @@ Nginx API for Lua
local args = ngx.req.get_uri_args(0)
- Removing the "count_limit" cap is strongly discouraged.
+ Removing the "max_args" cap is strongly discouraged.
ngx.req.get_post_args
- syntax: *ngx.req.get_post_args(count_limit?)*
+ syntax: *ngx.req.get_post_args(max_args?)*
context: *rewrite_by_lua*, access_by_lua*, content_by_lua*,
header_filter_by_lua**
@@ -1905,7 +1905,7 @@ Nginx API for Lua
arguments are silently discarded to guard against potential denial of
service attacks.
- However, the optional "count_limit" function argument can be used to
+ However, the optional "max_args" function argument can be used to
override this limit:
local args = ngx.req.get_post_args(10)
@@ -1915,10 +1915,10 @@ Nginx API for Lua
local args = ngx.req.get_post_args(0)
- Removing the "count_limit" cap is strongly discouraged.
+ Removing the "max_args" cap is strongly discouraged.
ngx.req.get_headers
- syntax: *headers = ngx.req.get_headers(count_limit?)*
+ syntax: *headers = ngx.req.get_headers(max_headers?)*
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
header_filter_by_lua**
@@ -1954,7 +1954,7 @@ Nginx API for Lua
are silently discarded to guard against potential denial of service
attacks.
- However, the optional "count_limit" function argument can be used to
+ However, the optional "max_headers" function argument can be used to
override this limit:
local args = ngx.req.get_headers(10)
@@ -1964,7 +1964,7 @@ Nginx API for Lua
local args = ngx.req.get_headers(0)
- Removing the "count_limit" cap is strongly discouraged.
+ Removing the "max_headers" cap is strongly discouraged.
ngx.req.set_header
syntax: *ngx.req.set_header(header_name, header_value)*
@@ -2564,14 +2564,27 @@ Nginx API for Lua
This method was first introduced in the "v0.3.1rc27" release.
ngx.decode_args
- syntax: *table = ngx.decode_args(str)*
+ syntax: *table = ngx.decode_args(str, max_args?)*
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
header_filter_by_lua**
Decodes a URI encoded query-string into a Lua table. This is the inverse
function of ngx.encode_args.
+ The optional "max_args" argument can be used to specify the
+ maximalnumber of arguments parsed from the "str" argument. By default, a
+ maximum of 100 request arguments are parsed (including those with the
+ same name) and that additional URI arguments are silently discarded to
+ guard against potential denial of service attacks.
+
+ This argument can be set to zero to remove the limit and to process all
+ request arguments received:
+
+ local args = ngx.decode_args(str, 0)
+
+ Removing the "max_args" cap is strongly discouraged.
+
This method was introduced in the "v0.5.0rc29".
ngx.encode_base64
View
@@ -1683,7 +1683,7 @@ See also [ngx.req.set_uri](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri).
ngx.req.get_uri_args
--------------------
-**syntax:** *args = ngx.req.get_uri_args(count_limit?)*
+**syntax:** *args = ngx.req.get_uri_args(max_args?)*
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua**
@@ -1750,9 +1750,9 @@ Here the `args` table will always look like
regardless of the actual request query string.
-Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks.
+Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks.
-However, the optional `count_limit` function argument can be used to override this limit:
+However, the optional `max_args` function argument can be used to override this limit:
local args = ngx.req.get_uri_args(10)
@@ -1764,11 +1764,11 @@ This argument can be set to zero to remove the limit and to process all request
local args = ngx.req.get_uri_args(0)
-Removing the `count_limit` cap is strongly discouraged.
+Removing the `max_args` cap is strongly discouraged.
ngx.req.get_post_args
---------------------
-**syntax:** *ngx.req.get_post_args(count_limit?)*
+**syntax:** *ngx.req.get_post_args(max_args?)*
**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua**
@@ -1839,7 +1839,7 @@ Empty key arguments are discarded. `POST /test` with body `=hello&=world` will y
Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks.
-However, the optional `count_limit` function argument can be used to override this limit:
+However, the optional `max_args` function argument can be used to override this limit:
local args = ngx.req.get_post_args(10)
@@ -1851,11 +1851,11 @@ This argument can be set to zero to remove the limit and to process all request
local args = ngx.req.get_post_args(0)
-Removing the `count_limit` cap is strongly discouraged.
+Removing the `max_args` cap is strongly discouraged.
ngx.req.get_headers
-------------------
-**syntax:** *headers = ngx.req.get_headers(count_limit?)*
+**syntax:** *headers = ngx.req.get_headers(max_headers?)*
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua**
@@ -1892,7 +1892,7 @@ the value of `ngx.req.get_headers()["Foo"]` will be a Lua (array) table such as:
Note that a maximum of 100 request headers are parsed by default (including those with the same name) and that additional request headers are silently discarded to guard against potential denial of service attacks.
-However, the optional `count_limit` function argument can be used to override this limit:
+However, the optional `max_headers` function argument can be used to override this limit:
local args = ngx.req.get_headers(10)
@@ -1904,7 +1904,7 @@ This argument can be set to zero to remove the limit and to process all request
local args = ngx.req.get_headers(0)
-Removing the `count_limit` cap is strongly discouraged.
+Removing the `max_headers` cap is strongly discouraged.
ngx.req.set_header
------------------
@@ -2449,12 +2449,22 @@ This method was first introduced in the `v0.3.1rc27` release.
ngx.decode_args
---------------
-**syntax:** *table = ngx.decode_args(str)*
+**syntax:** *table = ngx.decode_args(str, max_args?)*
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua**
Decodes a URI encoded query-string into a Lua table. This is the inverse function of [ngx.encode_args](http://wiki.nginx.org/HttpLuaModule#ngx.encode_args).
+The optional `max_args` argument can be used to specify the maximalnumber of arguments parsed from the `str` argument. By default, a maximum of 100 request arguments are parsed (including those with the same name) and that additional URI arguments are silently discarded to guard against potential denial of service attacks.
+
+This argument can be set to zero to remove the limit and to process all request arguments received:
+
+
+ local args = ngx.decode_args(str, 0)
+
+
+Removing the `max_args` cap is strongly discouraged.
+
This method was introduced in the `v0.5.0rc29`.
ngx.encode_base64
@@ -1715,7 +1715,7 @@ This argument can be set to zero to remove the limit and to process all request
Removing the <code>max_args</code> cap is strongly discouraged.
== ngx.req.get_post_args ==
-'''syntax:''' ''ngx.req.get_post_args(count_limit?)''
+'''syntax:''' ''ngx.req.get_post_args(max_args?)''
'''context:''' ''rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*''
@@ -1786,7 +1786,7 @@ Empty key arguments are discarded. <code>POST /test</code> with body <code>=hell
Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks.
-However, the optional <code>count_limit</code> function argument can be used to override this limit:
+However, the optional <code>max_args</code> function argument can be used to override this limit:
<geshi lang="lua">
local args = ngx.req.get_post_args(10)
@@ -1798,10 +1798,10 @@ This argument can be set to zero to remove the limit and to process all request
local args = ngx.req.get_post_args(0)
</geshi>
-Removing the <code>count_limit</code> cap is strongly discouraged.
+Removing the <code>max_args</code> cap is strongly discouraged.
== ngx.req.get_headers ==
-'''syntax:''' ''headers = ngx.req.get_headers(count_limit?)''
+'''syntax:''' ''headers = ngx.req.get_headers(max_headers?)''
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*''
@@ -1838,7 +1838,7 @@ the value of <code>ngx.req.get_headers()["Foo"]</code> will be a Lua (array) tab
Note that a maximum of 100 request headers are parsed by default (including those with the same name) and that additional request headers are silently discarded to guard against potential denial of service attacks.
-However, the optional <code>count_limit</code> function argument can be used to override this limit:
+However, the optional <code>max_headers</code> function argument can be used to override this limit:
<geshi lang="lua">
local args = ngx.req.get_headers(10)
@@ -1850,7 +1850,7 @@ This argument can be set to zero to remove the limit and to process all request
local args = ngx.req.get_headers(0)
</geshi>
-Removing the <code>count_limit</code> cap is strongly discouraged.
+Removing the <code>max_headers</code> cap is strongly discouraged.
== ngx.req.set_header ==
'''syntax:''' ''ngx.req.set_header(header_name, header_value)''
@@ -2378,11 +2378,7 @@ This method was first introduced in the <code>v0.3.1rc27</code> release.
Decodes a URI encoded query-string into a Lua table. This is the inverse function of [[#ngx.encode_args|ngx.encode_args]].
-The optional <code>max_args</code> argument can be used to specify the maximal
-number of arguments parsed from the <code>str</code> argument. By default, a
-maximum of 100 request arguments are parsed (including those with the same name)
-and that additional URI arguments are silently discarded to guard
-against potential denial of service attacks.
+The optional <code>max_args</code> argument can be used to specify the maximalnumber of arguments parsed from the <code>str</code> argument. By default, a maximum of 100 request arguments are parsed (including those with the same name) and that additional URI arguments are silently discarded to guard against potential denial of service attacks.
This argument can be set to zero to remove the limit and to process all request arguments received:

0 comments on commit 8f6fab6

Please sign in to comment.