This commit is contained in:
agentzh (章亦春) 2011-09-02 16:16:55 +08:00
Родитель 7e997bbbd3
Коммит dd0d4d0966
3 изменённых файлов: 121 добавлений и 4 удалений

69
README
Просмотреть файл

@ -8,9 +8,9 @@ Status
This module is under active development and is already production ready.
Version
This document describes ngx_lua v0.2.1rc20
This document describes ngx_lua v0.3.0
(<https://github.com/chaoslawful/lua-nginx-module/downloads>) released
on 1 September 2011.
on 2 September 2011.
Synopsis
# set search paths for pure Lua external libraries (';;' is the default path):
@ -2028,6 +2028,71 @@ Known Issues
end
assuming your current Lua module is named C<foo.bar>. This will guarantee that you have declared your Lua functions' local Lua variables as "local" in your Lua modules, or bad race conditions while accessing these variables under load will tragically happen. See the C<Data Sharing within an Nginx Worker> for the reasons of this danger.
Changes
v0.3.0
New features
* added the header_filter_by_lua and header_filter_by_lua_file
directives. thanks Liseen Wan (万珣新).
* implemented the PCRE regex API for Lua: ngx.re.match, ngx.re.gmatch,
ngx.re.sub, and ngx.re.gsub.
* now we add the "ngx" and "ndk" table into "package.loaded" such that
the user can write "local ngx = require 'ngx'" and "local ndk =
require 'ndk'". thanks @Lance.
* added new directive lua_regex_cache_max_entries to control the upper
limit of the worker-process-level compiled-regex cache enabled by
the "o" regex option.
* implemented the special ngx.ctx Lua table for user programmers to
store per-request Lua context data for their applications. thanks
欧远宁 for suggesting this feature.
* now ngx.print and ngx.say allow (nested) array-like table arguments.
the array elements in them will be sent piece by piece. this will
avoid string concatenation for templating engines like ltp
(<http://www.savarese.com/software/ltp/>).
* implemented the ngx.req.get_post_args method for fetching
url-encoded POST query arguments from within Lua.
* implemented the ngx.req.get_uri_args method to fetch parsed URL
query arguments from within Lua. thanks Bertrand Mansion (golgote).
* added new function ngx.parse_http_time, thanks James Hurst.
* now we allow Lua boolean and "nil" values in arguments to ngx.say,
ngx.print, ngx.log and print.
* added support for user C macros "LUA_DEFAULT_PATH" and
"LUA_DEFAULT_CPATH". for now we can only define them in "ngx_lua"'s
"config" file because nginx "configure"'s "--with-cc-opt" option
hates values with double-quotes in them. sigh. ngx_openresty
(<http://openresty.org/>) is already using this feature to bundle
3rd-party Lua libraries.
Bug fixes
* worked-around the "stack overflow" issue while using
"luarocks.loader" and disabling lua_code_cache, as described as
github issue #27. thanks Patrick Crosby.
* fixed the "zero size buf in output" alert while combining
lua_need_request_body on + access_by_lua/rewrite_by_lua +
proxy_pass/fastcgi_pass. thanks Liseen Wan (万珣新).
* fixed issues with HTTP 1.0 HEAD requests.
* made setting "ngx.header.HEADER" after sending out response headers
throw out a Lua exception to help debugging issues like github issue
#49. thanks Bill Donahue (ikhoyo).
* fixed an issue regarding defining global variables in C header
files: we should have defined the global "ngx_http_lua_exception" in
a single compilation unit. thanks @姜大炮.
Authors
* chaoslawful (王晓哲) <chaoslawful at gmail dot com>

Просмотреть файл

@ -13,7 +13,7 @@ This module is under active development and is already production ready.
Version
=======
This document describes ngx_lua [v0.2.1rc20](https://github.com/chaoslawful/lua-nginx-module/downloads) released on 1 September 2011.
This document describes ngx_lua [v0.3.0](https://github.com/chaoslawful/lua-nginx-module/downloads) released on 2 September 2011.
Synopsis
========
@ -2109,6 +2109,33 @@ Known Issues
assuming your current Lua module is named `foo.bar`. This will guarantee that you have declared your Lua functions' local Lua variables as "local" in your Lua modules, or bad race conditions while accessing these variables under load will tragically happen. See the `Data Sharing within an Nginx Worker` for the reasons of this danger.
Changes
=======
v0.3.0
------
**New features**
* added the [header_filter_by_lua](http://wiki.nginx.org/HttpLuaModule#header_filter_by_lua) and [header_filter_by_lua_file](http://wiki.nginx.org/HttpLuaModule#header_filter_by_lua_file) directives. thanks Liseen Wan (万珣新).
* implemented the PCRE regex API for Lua: [ngx.re.match](http://wiki.nginx.org/HttpLuaModule#ngx.re.match), [ngx.re.gmatch](http://wiki.nginx.org/HttpLuaModule#ngx.re.gmatch), [ngx.re.sub](http://wiki.nginx.org/HttpLuaModule#ngx.re.sub), and [ngx.re.gsub](http://wiki.nginx.org/HttpLuaModule#ngx.re.gsub).
* now we add the `ngx` and `ndk` table into `package.loaded` such that the user can write `local ngx = require 'ngx'` and `local ndk = require 'ndk'`. thanks @Lance.
* added new directive [lua_regex_cache_max_entries](http://wiki.nginx.org/HttpLuaModule#lua_regex_cache_max_entries) to control the upper limit of the worker-process-level compiled-regex cache enabled by the `o` regex option.
* implemented the special [ngx.ctx](http://wiki.nginx.org/HttpLuaModule#ngx.ctx) Lua table for user programmers to store per-request Lua context data for their applications. thanks 欧远宁 for suggesting this feature.
* now [ngx.print](http://wiki.nginx.org/HttpLuaModule#ngx.print) and [ngx.say](http://wiki.nginx.org/HttpLuaModule#ngx.say) allow (nested) array-like table arguments. the array elements in them will be sent piece by piece. this will avoid string concatenation for templating engines like [ltp](http://www.savarese.com/software/ltp/).
* implemented the [ngx.req.get_post_args](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_args) method for fetching url-encoded POST query arguments from within Lua.
* implemented the [ngx.req.get_uri_args](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_uri_args) method to fetch parsed URL query arguments from within Lua. thanks Bertrand Mansion (golgote).
* added new function [ngx.parse_http_time](http://wiki.nginx.org/HttpLuaModule#ngx.parse_http_time), thanks James Hurst.
* now we allow Lua boolean and `nil` values in arguments to [ngx.say](http://wiki.nginx.org/HttpLuaModule#ngx.say), [ngx.print](http://wiki.nginx.org/HttpLuaModule#ngx.print), [ngx.log](http://wiki.nginx.org/HttpLuaModule#ngx.log) and [print](http://wiki.nginx.org/HttpLuaModule#print).
* added support for user C macros `LUA_DEFAULT_PATH` and `LUA_DEFAULT_CPATH`. for now we can only define them in `ngx_lua`'s `config` file because nginx `configure`'s `--with-cc-opt` option hates values with double-quotes in them. sigh. [ngx_openresty](http://openresty.org/) is already using this feature to bundle 3rd-party Lua libraries.
**Bug fixes**
* worked-around the "stack overflow" issue while using `luarocks.loader` and disabling [lua_code_cache](http://wiki.nginx.org/HttpLuaModule#lua_code_cache), as described as github issue #27. thanks Patrick Crosby.
* fixed the `zero size buf in output` alert while combining [lua_need_request_body](http://wiki.nginx.org/HttpLuaModule#lua_need_request_body) on + [access_by_lua](http://wiki.nginx.org/HttpLuaModule#access_by_lua)/[rewrite_by_lua](http://wiki.nginx.org/HttpLuaModule#rewrite_by_lua) + [proxy_pass](http://wiki.nginx.org/HttpProxyModule#proxy_pass)/[fastcgi_pass](http://wiki.nginx.org/HttpFcgiModule#fastcgi_pass). thanks Liseen Wan (万珣新).
* fixed issues with HTTP 1.0 HEAD requests.
* made setting `ngx.header.HEADER` after sending out response headers throw out a Lua exception to help debugging issues like github issue #49. thanks Bill Donahue (ikhoyo).
* fixed an issue regarding defining global variables in C header files: we should have defined the global `ngx_http_lua_exception` in a single compilation unit. thanks @姜大炮.
Authors
=======

Просмотреть файл

@ -10,7 +10,7 @@ This module is under active development and is already production ready.
= Version =
This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/downloads v0.2.1rc20] released on 1 September 2011.
This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/downloads v0.3.0] released on 2 September 2011.
= Synopsis =
<geshi lang="nginx">
@ -2033,6 +2033,31 @@ filtering chain affects a lot. The correct configure adding order is:
</geshi>
assuming your current Lua module is named <code>foo.bar</code>. This will guarantee that you have declared your Lua functions' local Lua variables as "local" in your Lua modules, or bad race conditions while accessing these variables under load will tragically happen. See the <code>Data Sharing within an Nginx Worker</code> for the reasons of this danger.
= Changes =
== v0.3.0 ==
'''New features'''
* added the [[#header_filter_by_lua|header_filter_by_lua]] and [[#header_filter_by_lua_file|header_filter_by_lua_file]] directives. thanks Liseen Wan (万珣新).
* implemented the PCRE regex API for Lua: [[#ngx.re.match|ngx.re.match]], [[#ngx.re.gmatch|ngx.re.gmatch]], [[#ngx.re.sub|ngx.re.sub]], and [[#ngx.re.gsub|ngx.re.gsub]].
* now we add the <code>ngx</code> and <code>ndk</code> table into <code>package.loaded</code> such that the user can write <code>local ngx = require 'ngx'</code> and <code>local ndk = require 'ndk'</code>. thanks @Lance.
* added new directive [[#lua_regex_cache_max_entries|lua_regex_cache_max_entries]] to control the upper limit of the worker-process-level compiled-regex cache enabled by the <code>o</code> regex option.
* implemented the special [[#ngx.ctx|ngx.ctx]] Lua table for user programmers to store per-request Lua context data for their applications. thanks 欧远宁 for suggesting this feature.
* now [[#ngx.print|ngx.print]] and [[#ngx.say|ngx.say]] allow (nested) array-like table arguments. the array elements in them will be sent piece by piece. this will avoid string concatenation for templating engines like [http://www.savarese.com/software/ltp/ ltp].
* implemented the [[#ngx.req.get_post_args|ngx.req.get_post_args]] method for fetching url-encoded POST query arguments from within Lua.
* implemented the [[#ngx.req.get_uri_args|ngx.req.get_uri_args]] method to fetch parsed URL query arguments from within Lua. thanks Bertrand Mansion (golgote).
* added new function [[#ngx.parse_http_time|ngx.parse_http_time]], thanks James Hurst.
* now we allow Lua boolean and <code>nil</code> values in arguments to [[#ngx.say|ngx.say]], [[#ngx.print|ngx.print]], [[#ngx.log|ngx.log]] and [[#print|print]].
* added support for user C macros <code>LUA_DEFAULT_PATH</code> and <code>LUA_DEFAULT_CPATH</code>. for now we can only define them in <code>ngx_lua</code>'s <code>config</code> file because nginx <code>configure</code>'s <code>--with-cc-opt</code> option hates values with double-quotes in them. sigh. [http://openresty.org/ ngx_openresty] is already using this feature to bundle 3rd-party Lua libraries.
'''Bug fixes'''
* worked-around the "stack overflow" issue while using <code>luarocks.loader</code> and disabling [[#lua_code_cache|lua_code_cache]], as described as github issue #27. thanks Patrick Crosby.
* fixed the <code>zero size buf in output</code> alert while combining [[#lua_need_request_body|lua_need_request_body]] on + [[#access_by_lua|access_by_lua]]/[[#rewrite_by_lua|rewrite_by_lua]] + [[HttpProxyModule#proxy_pass|proxy_pass]]/[[HttpFcgiModule#fastcgi_pass|fastcgi_pass]]. thanks Liseen Wan (万珣新).
* fixed issues with HTTP 1.0 HEAD requests.
* made setting <code>ngx.header.HEADER</code> after sending out response headers throw out a Lua exception to help debugging issues like github issue #49. thanks Bill Donahue (ikhoyo).
* fixed an issue regarding defining global variables in C header files: we should have defined the global <code>ngx_http_lua_exception</code> in a single compilation unit. thanks @姜大炮.
= Authors =
* chaoslawful (王晓哲) <chaoslawful at gmail dot com>