From 89af745e12a7c62d6194afbb5666502834b185e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Mon, 13 Feb 2012 20:35:48 +0800 Subject: [PATCH] updated docs to reflect recent changes. --- README | 24 ++++++++++++++++++++---- README.markdown | 24 ++++++++++++++++++++---- doc/HttpLuaModule.wiki | 23 +++++++++++++++++++---- 3 files changed, 59 insertions(+), 12 deletions(-) diff --git a/README b/README index 06367907..8afaec06 100644 --- a/README +++ b/README @@ -8,8 +8,8 @@ Status This module is under active development and is production ready. Version - This document describes ngx_lua v0.5.0rc5 - () released on 7 + This document describes ngx_lua v0.5.0rc6 + () released on 13 February 2012. Synopsis @@ -1037,7 +1037,8 @@ Nginx API for Lua 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. + while Lua booleans result in literal "true" or "false" strings. And the + "ngx.null" constant will yield the "null" string output. ngx.ctx 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** - 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 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. + 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 @@ -2306,6 +2309,7 @@ Nginx API for Lua 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 for details. @@ -2573,6 +2577,16 @@ Nginx API for Lua 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 syntax: *str = ngx.today()* @@ -4488,3 +4502,5 @@ See Also * The ngx_openresty bundle () + * [Chinese (HttpLuaModuleZh)] + diff --git a/README.markdown b/README.markdown index c2d395a2..7a669ac7 100644 --- a/README.markdown +++ b/README.markdown @@ -13,7 +13,7 @@ This module is under active development and is production ready. 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 ======== @@ -980,7 +980,7 @@ It is equivalent to 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 ------- @@ -2186,7 +2186,7 @@ ngx.print **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. @@ -2209,6 +2209,8 @@ will yield the output 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. ngx.say @@ -2227,7 +2229,7 @@ ngx.log 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. @@ -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. +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 --------- **syntax:** *str = ngx.today()* @@ -3877,3 +3889,7 @@ See Also * [HttpMemcModule](http://wiki.nginx.org/HttpMemcModule) * [The ngx_openresty bundle](http://openresty.org) +
+* [ Chinese](http://wiki.nginx.org/HttpLuaModuleZh) +
+ diff --git a/doc/HttpLuaModule.wiki b/doc/HttpLuaModule.wiki index 3663d829..c7991699 100644 --- a/doc/HttpLuaModule.wiki +++ b/doc/HttpLuaModule.wiki @@ -10,7 +10,7 @@ This module is under active development and is production ready. = 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 = @@ -942,7 +942,7 @@ It is equivalent to 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 == '''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*'' -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. @@ -2147,6 +2147,8 @@ will yield the output 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|ngx.flush]] for more details. == 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. -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|Nginx log level constants]] for details. @@ -2411,6 +2413,15 @@ Returns the binary form of the MD5 digest of the str argument. 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 str argument. + +This function was first introduced in the v0.5.0rc6. + == ngx.today == '''syntax:''' ''str = ngx.today()'' @@ -3745,3 +3756,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * [[HttpMemcModule]] * [http://openresty.org The ngx_openresty bundle] +
+* [[HttpLuaModuleZh| Chinese]] +
+