[ANN] ngx_openresty devel version released

agentzh agentzh at gmail.com
Mon Feb 4 07:26:36 UTC 2013

I am delighted to announce the new development version of ngx_openresty,


Special thanks go to all our contributors and users for helping make this

Below is the complete change log for this release, as compared to the last
(development) release,

 *   upgraded LuaNginxModule to 0.7.14.

     *   feature: implemented named subpattern support in
         ngx.re.match, ngx.re.gmatch, ngx.re.sub, and ngx.re.gsub;
         also added new regex option "D" to allow duplicate named
         subpattern names. thanks Ray Bejjani for the patch.

     *   feature: implemented the "J" regex option for the PCRE
         Javascript compatible mode in the ngx.re API. thanks lhmwzy
         for requesting this.

     *   feature: setting ngx.header.HEADER after sending out the
         response headers now only produced an error message in the
         Nginx error logs and does not throw out a Lua exception.
         this should be handy for Lua development. thanks Matthieu
         Tourne for requesting this.

     *   feature: automatic Lua 5.1 interpreter detection on OpenBSD
         5.2. thanks Ilya Shipitsin for the patch.

     *   refactor: when the Nginx core fails to send the "100
         Continue" response in case of the "Expect: 100-continue"
         request header (or just running out of memory),
         ngx.req.read_body() will no longer throw out a "failed to
         read request body" Lua error but will just terminate the
         current request and returns the 500 error page immediately,
         just as what the Nginx core currently does in this case.

     *   bugfix: because of the recent API behaviour changes in Nginx
         1.2.6+ and 1.3.9+, the "http request count is zero" alert
         might happen when ngx.req.read_body() was called to read the
         request body and Nginx failed to send out the "100 Continue"
         response (like client connection early abortion and etc).
         thanks stonehuzhan for reporting this issue.

     *   bugfix: setting the "eof" argument (i.e., "ngx.arg[2]") in
         body_filter_by_lua* for a subrequest could truncate the main
         request's response data stream.

     *   bugfix: in body_filter_by_lua*, the "eof" argument (i.e.,
         "ngx.arg[2]") was never set in Nginx subrequests.

     *   bugfix: for nginx 1.3.9+ compatibility, we return an error
         while using ngx.req.socket() to read the chunked request
         body (for now), because chunked support in the downstream
         cosocket API is still a TODO.

     *   bugfix: for nginx 1.3.9+ compatibility, rewrite_by_lua* or
         access_by_lua* handlers might hang if the request body was
         read there, because the Nginx core now overwrites
         "r->write_event_handler" to "ngx_http_request_empty_handler"
         in its "ngx_http_read_client_request_body" API.

     *   bugfix: for nginx 1.3.9+ compatibility, we now throw an
         error in ngx.req.init_body(), ngx.req.set_body_data(), and
         ngx.req.set_body_file() when calling them without calling
         ngx.req.read_body() or after calling ngx.req.discard_body().

     *   bugfix: a compilation error would happen when building with
         an Nginx core patched by the SPDY patch 58_1.3.11 because
         the patch had removed a request field from the Nginx core.
         thanks Chris Lea for reporting this.

     *   bugfix: we did not get the request reference counter (i.e.,
         "r->main->count") right when lua_need_request_body was
         turned on and Nginx versions older than 1.2.6 or 1.2.9 were

     *   optimize: we no longer traverse the captured body chain
         every time we append a new link to it in ngx.location.capture
         and ngx.location.capture_multi.

     *   docs: documented the ngx.quote_sql_str API.

 *   upgraded SrcacheNginxModule to 0.18.

     *   bugfix: we might serve a truncated srcache_fetch
         subrequest's response body as the cached response.

 *   upgraded EchoNginxModule to 0.42.

     *   feature: the echo_after_body directive is now enabled in
         Nginx subrequests (again).

     *   bugfix: we did not set the "last_in_chain" buffer flag when
         echo_after_body was used in subrequests.

 *   upgraded FormInputNginxModule to 0.07.

     *   bugfix: Nginx might hang when it failed to send the "100
         Continue" response for Nginx versions older than 1.2.6 (and
         those older than 1.3.9 in the 1.3.x series).

 *   upgraded NginxDevelKit ot 0.2.18.

     *   bugfix: various fixes for C89 compliance. also stripped some
         line-trailing spaces.

     *   bugfix: guard macros were missing in the "ndk_set_var.h"
         header file.

     *   bugfix: the "ndk_string" submodule failed to compile with
         gcc 4.6. thanks Jon Kolb for the patch.

     *   bugfix: the "ndk_set_var" example did not use the new way in
         its "config" file. thanks Amos Wenger for the patch.

     *   docs: fixes in README to reflect recent changes. thanks Amos
         Wenger for the patch.

 *   applied Ruslan Ermilov's resolver_wev_handler_segfault_with_poll
     patch to the Nginx core bundled. see the related nginx-devel
     thread for details.

 *   excluded the allow_request_body_updating patch from the Nginx
     core bundled.

The HTML version of the change log with lots of helpful hyper-links
can be browsed here:


OpenResty (aka. ngx_openresty) is a full-fledged web application server by
bundling the standard Nginx core, lots of 3rd-party Nginx modules and Lua
libraries, as well as most of their external dependencies. See OpenResty's
homepage for details:


We have been running extensive testing on our Amazon EC2 test cluster and
ensure that all the components (including the Nginx core) play well
together. The latest test report can always be found here:



More information about the nginx mailing list