updated docs to reflect recent changes.
This commit is contained in:
Родитель
96e9b3038e
Коммит
89af745e12
24
README
24
README
|
@ -8,8 +8,8 @@ Status
|
||||||
This module is under active development and is production ready.
|
This module is under active development and is production ready.
|
||||||
|
|
||||||
Version
|
Version
|
||||||
This document describes ngx_lua v0.5.0rc5
|
This document describes ngx_lua v0.5.0rc6
|
||||||
(<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 7
|
(<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 13
|
||||||
February 2012.
|
February 2012.
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
|
@ -1037,7 +1037,8 @@ Nginx API for Lua
|
||||||
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
||||||
|
|
||||||
Lua "nil" arguments are accepted and result in literal "nil" strings
|
Lua "nil" arguments are accepted and result in literal "nil" strings
|
||||||
while Lua booleans result in literal "true" or "false" strings.
|
while Lua booleans result in literal "true" or "false" strings. And the
|
||||||
|
"ngx.null" constant will yield the "null" string output.
|
||||||
|
|
||||||
ngx.ctx
|
ngx.ctx
|
||||||
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
|
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
|
||||||
|
@ -2260,7 +2261,7 @@ Nginx API for Lua
|
||||||
|
|
||||||
context: *rewrite_by_lua*, access_by_lua*, content_by_lua**
|
context: *rewrite_by_lua*, access_by_lua*, content_by_lua**
|
||||||
|
|
||||||
Emit arguments concatenated to the HTTP client (as response body). If
|
Emits arguments concatenated to the HTTP client (as response body). If
|
||||||
response headers have not been sent, this function will send headers out
|
response headers have not been sent, this function will send headers out
|
||||||
first and then output body data.
|
first and then output body data.
|
||||||
|
|
||||||
|
@ -2283,6 +2284,8 @@ Nginx API for Lua
|
||||||
|
|
||||||
Non-array table arguments will cause a Lua exception to be thrown.
|
Non-array table arguments will cause a Lua exception to be thrown.
|
||||||
|
|
||||||
|
The "ngx.null" constant will yield the "null" string output.
|
||||||
|
|
||||||
This is an asynchronous call and will return immediately without waiting
|
This is an asynchronous call and will return immediately without waiting
|
||||||
for all the data to be written into the system send buffer. To run in
|
for all the data to be written into the system send buffer. To run in
|
||||||
synchronous mode, call "ngx.flush(true)" after calling "ngx.print". This
|
synchronous mode, call "ngx.flush(true)" after calling "ngx.print". This
|
||||||
|
@ -2306,6 +2309,7 @@ Nginx API for Lua
|
||||||
|
|
||||||
Lua "nil" arguments are accepted and result in literal "nil" string
|
Lua "nil" arguments are accepted and result in literal "nil" string
|
||||||
while Lua booleans result in literal "true" or "false" string outputs.
|
while Lua booleans result in literal "true" or "false" string outputs.
|
||||||
|
And the "ngx.null" constant will yield the "null" string output.
|
||||||
|
|
||||||
The "log_level" argument can take constants like "ngx.ERR" and
|
The "log_level" argument can take constants like "ngx.ERR" and
|
||||||
"ngx.WARN". Check out Nginx log level constants for details.
|
"ngx.WARN". Check out Nginx log level constants for details.
|
||||||
|
@ -2573,6 +2577,16 @@ Nginx API for Lua
|
||||||
|
|
||||||
See ngx.md5 if the hexadecimal form of the MD5 digest is required.
|
See ngx.md5 if the hexadecimal form of the MD5 digest is required.
|
||||||
|
|
||||||
|
ngx.sha1_bin
|
||||||
|
syntax: *digest = ngx.sha1_bin(str)*
|
||||||
|
|
||||||
|
context: *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*,
|
||||||
|
header_filter_by_lua**
|
||||||
|
|
||||||
|
Returns the binary form of the SHA-1 digest of the "str" argument.
|
||||||
|
|
||||||
|
This function was first introduced in the "v0.5.0rc6".
|
||||||
|
|
||||||
ngx.today
|
ngx.today
|
||||||
syntax: *str = ngx.today()*
|
syntax: *str = ngx.today()*
|
||||||
|
|
||||||
|
@ -4488,3 +4502,5 @@ See Also
|
||||||
|
|
||||||
* The ngx_openresty bundle (<http://openresty.org>)
|
* The ngx_openresty bundle (<http://openresty.org>)
|
||||||
|
|
||||||
|
* [Chinese (HttpLuaModuleZh)]
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ This module is under active development and is production ready.
|
||||||
Version
|
Version
|
||||||
=======
|
=======
|
||||||
|
|
||||||
This document describes ngx_lua [v0.5.0rc5](https://github.com/chaoslawful/lua-nginx-module/tags) released on 7 February 2012.
|
This document describes ngx_lua [v0.5.0rc6](https://github.com/chaoslawful/lua-nginx-module/tags) released on 13 February 2012.
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
========
|
========
|
||||||
|
@ -980,7 +980,7 @@ It is equivalent to
|
||||||
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
||||||
|
|
||||||
|
|
||||||
Lua `nil` arguments are accepted and result in literal `"nil"` strings while Lua booleans result in literal `"true"` or `"false"` strings.
|
Lua `nil` arguments are accepted and result in literal `"nil"` strings while Lua booleans result in literal `"true"` or `"false"` strings. And the `ngx.null` constant will yield the `"null"` string output.
|
||||||
|
|
||||||
ngx.ctx
|
ngx.ctx
|
||||||
-------
|
-------
|
||||||
|
@ -2186,7 +2186,7 @@ ngx.print
|
||||||
|
|
||||||
**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua**
|
**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua**
|
||||||
|
|
||||||
Emit arguments concatenated to the HTTP client (as response body). If response headers have not been sent, this function will send headers out first and then output body data.
|
Emits arguments concatenated to the HTTP client (as response body). If response headers have not been sent, this function will send headers out first and then output body data.
|
||||||
|
|
||||||
Lua `nil` values will output `"nil"` strings and Lua boolean values will output `"true"` and `"false"` literal strings respectively.
|
Lua `nil` values will output `"nil"` strings and Lua boolean values will output `"true"` and `"false"` literal strings respectively.
|
||||||
|
|
||||||
|
@ -2209,6 +2209,8 @@ will yield the output
|
||||||
|
|
||||||
Non-array table arguments will cause a Lua exception to be thrown.
|
Non-array table arguments will cause a Lua exception to be thrown.
|
||||||
|
|
||||||
|
The `ngx.null` constant will yield the `"null"` string output.
|
||||||
|
|
||||||
This is an asynchronous call and will return immediately without waiting for all the data to be written into the system send buffer. To run in synchronous mode, call `ngx.flush(true)` after calling `ngx.print`. This can be particularly useful for streaming output. See [ngx.flush](http://wiki.nginx.org/HttpLuaModule#ngx.flush) for more details.
|
This is an asynchronous call and will return immediately without waiting for all the data to be written into the system send buffer. To run in synchronous mode, call `ngx.flush(true)` after calling `ngx.print`. This can be particularly useful for streaming output. See [ngx.flush](http://wiki.nginx.org/HttpLuaModule#ngx.flush) for more details.
|
||||||
|
|
||||||
ngx.say
|
ngx.say
|
||||||
|
@ -2227,7 +2229,7 @@ ngx.log
|
||||||
|
|
||||||
Log arguments concatenated to error.log with the given logging level.
|
Log arguments concatenated to error.log with the given logging level.
|
||||||
|
|
||||||
Lua `nil` arguments are accepted and result in literal `"nil"` string while Lua booleans result in literal `"true"` or `"false"` string outputs.
|
Lua `nil` arguments are accepted and result in literal `"nil"` string while Lua booleans result in literal `"true"` or `"false"` string outputs. And the `ngx.null` constant will yield the `"null"` string output.
|
||||||
|
|
||||||
The `log_level` argument can take constants like `ngx.ERR` and `ngx.WARN`. Check out [Nginx log level constants](http://wiki.nginx.org/HttpLuaModule#Nginx_log_level_constants) for details.
|
The `log_level` argument can take constants like `ngx.ERR` and `ngx.WARN`. Check out [Nginx log level constants](http://wiki.nginx.org/HttpLuaModule#Nginx_log_level_constants) for details.
|
||||||
|
|
||||||
|
@ -2488,6 +2490,16 @@ Returns the binary form of the MD5 digest of the `str` argument.
|
||||||
|
|
||||||
See [ngx.md5](http://wiki.nginx.org/HttpLuaModule#ngx.md5) if the hexadecimal form of the MD5 digest is required.
|
See [ngx.md5](http://wiki.nginx.org/HttpLuaModule#ngx.md5) if the hexadecimal form of the MD5 digest is required.
|
||||||
|
|
||||||
|
ngx.sha1_bin
|
||||||
|
------------
|
||||||
|
**syntax:** *digest = ngx.sha1_bin(str)*
|
||||||
|
|
||||||
|
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua**
|
||||||
|
|
||||||
|
Returns the binary form of the SHA-1 digest of the `str` argument.
|
||||||
|
|
||||||
|
This function was first introduced in the `v0.5.0rc6`.
|
||||||
|
|
||||||
ngx.today
|
ngx.today
|
||||||
---------
|
---------
|
||||||
**syntax:** *str = ngx.today()*
|
**syntax:** *str = ngx.today()*
|
||||||
|
@ -3877,3 +3889,7 @@ See Also
|
||||||
* [HttpMemcModule](http://wiki.nginx.org/HttpMemcModule)
|
* [HttpMemcModule](http://wiki.nginx.org/HttpMemcModule)
|
||||||
* [The ngx_openresty bundle](http://openresty.org)
|
* [The ngx_openresty bundle](http://openresty.org)
|
||||||
|
|
||||||
|
<div id="translations">
|
||||||
|
* [ Chinese](http://wiki.nginx.org/HttpLuaModuleZh)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ This module is under active development and is production ready.
|
||||||
|
|
||||||
= Version =
|
= Version =
|
||||||
|
|
||||||
This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/tags v0.5.0rc5] released on 7 February 2012.
|
This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/tags v0.5.0rc6] released on 13 February 2012.
|
||||||
|
|
||||||
= Synopsis =
|
= Synopsis =
|
||||||
<geshi lang="nginx">
|
<geshi lang="nginx">
|
||||||
|
@ -942,7 +942,7 @@ It is equivalent to
|
||||||
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
ngx.log(ngx.NOTICE, 'lua print: ', a, b, ...)
|
||||||
</geshi>
|
</geshi>
|
||||||
|
|
||||||
Lua <code>nil</code> arguments are accepted and result in literal <code>"nil"</code> strings while Lua booleans result in literal <code>"true"</code> or <code>"false"</code> strings.
|
Lua <code>nil</code> arguments are accepted and result in literal <code>"nil"</code> strings while Lua booleans result in literal <code>"true"</code> or <code>"false"</code> strings. And the <code>ngx.null</code> constant will yield the <code>"null"</code> string output.
|
||||||
|
|
||||||
== ngx.ctx ==
|
== ngx.ctx ==
|
||||||
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*''
|
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*''
|
||||||
|
@ -2124,7 +2124,7 @@ This API was first introduced in ngx_lua v0.3.1rc6.
|
||||||
|
|
||||||
'''context:''' ''rewrite_by_lua*, access_by_lua*, content_by_lua*''
|
'''context:''' ''rewrite_by_lua*, access_by_lua*, content_by_lua*''
|
||||||
|
|
||||||
Emit arguments concatenated to the HTTP client (as response body). If response headers have not been sent, this function will send headers out first and then output body data.
|
Emits arguments concatenated to the HTTP client (as response body). If response headers have not been sent, this function will send headers out first and then output body data.
|
||||||
|
|
||||||
Lua <code>nil</code> values will output <code>"nil"</code> strings and Lua boolean values will output <code>"true"</code> and <code>"false"</code> literal strings respectively.
|
Lua <code>nil</code> values will output <code>"nil"</code> strings and Lua boolean values will output <code>"true"</code> and <code>"false"</code> literal strings respectively.
|
||||||
|
|
||||||
|
@ -2147,6 +2147,8 @@ will yield the output
|
||||||
|
|
||||||
Non-array table arguments will cause a Lua exception to be thrown.
|
Non-array table arguments will cause a Lua exception to be thrown.
|
||||||
|
|
||||||
|
The <code>ngx.null</code> constant will yield the <code>"null"</code> string output.
|
||||||
|
|
||||||
This is an asynchronous call and will return immediately without waiting for all the data to be written into the system send buffer. To run in synchronous mode, call <code>ngx.flush(true)</code> after calling <code>ngx.print</code>. This can be particularly useful for streaming output. See [[#ngx.flush|ngx.flush]] for more details.
|
This is an asynchronous call and will return immediately without waiting for all the data to be written into the system send buffer. To run in synchronous mode, call <code>ngx.flush(true)</code> after calling <code>ngx.print</code>. This can be particularly useful for streaming output. See [[#ngx.flush|ngx.flush]] for more details.
|
||||||
|
|
||||||
== ngx.say ==
|
== ngx.say ==
|
||||||
|
@ -2163,7 +2165,7 @@ Just as [[#ngx.print|ngx.print]] but also emit a trailing newline.
|
||||||
|
|
||||||
Log arguments concatenated to error.log with the given logging level.
|
Log arguments concatenated to error.log with the given logging level.
|
||||||
|
|
||||||
Lua <code>nil</code> arguments are accepted and result in literal <code>"nil"</code> string while Lua booleans result in literal <code>"true"</code> or <code>"false"</code> string outputs.
|
Lua <code>nil</code> arguments are accepted and result in literal <code>"nil"</code> string while Lua booleans result in literal <code>"true"</code> or <code>"false"</code> string outputs. And the <code>ngx.null</code> constant will yield the <code>"null"</code> string output.
|
||||||
|
|
||||||
The <code>log_level</code> argument can take constants like <code>ngx.ERR</code> and <code>ngx.WARN</code>. Check out [[#Nginx log level constants|Nginx log level constants]] for details.
|
The <code>log_level</code> argument can take constants like <code>ngx.ERR</code> and <code>ngx.WARN</code>. Check out [[#Nginx log level constants|Nginx log level constants]] for details.
|
||||||
|
|
||||||
|
@ -2411,6 +2413,15 @@ Returns the binary form of the MD5 digest of the <code>str</code> argument.
|
||||||
|
|
||||||
See [[#ngx.md5|ngx.md5]] if the hexadecimal form of the MD5 digest is required.
|
See [[#ngx.md5|ngx.md5]] if the hexadecimal form of the MD5 digest is required.
|
||||||
|
|
||||||
|
== ngx.sha1_bin ==
|
||||||
|
'''syntax:''' ''digest = ngx.sha1_bin(str)''
|
||||||
|
|
||||||
|
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*''
|
||||||
|
|
||||||
|
Returns the binary form of the SHA-1 digest of the <code>str</code> argument.
|
||||||
|
|
||||||
|
This function was first introduced in the <code>v0.5.0rc6</code>.
|
||||||
|
|
||||||
== ngx.today ==
|
== ngx.today ==
|
||||||
'''syntax:''' ''str = ngx.today()''
|
'''syntax:''' ''str = ngx.today()''
|
||||||
|
|
||||||
|
@ -3745,3 +3756,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
* [[HttpMemcModule]]
|
* [[HttpMemcModule]]
|
||||||
* [http://openresty.org The ngx_openresty bundle]
|
* [http://openresty.org The ngx_openresty bundle]
|
||||||
|
|
||||||
|
<div id="translations">
|
||||||
|
* [[HttpLuaModuleZh| Chinese]]
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче