Ngx_openresty (stable) released

Hi, folks!

I’m happy to announce that the new stable release of ngx_openresty,, has just been kicked out of door:

OpenResty® - Open source

This is the first stable release of ngx_openresty that is based on the
Nginx core 1.0.8. And this is a big release with a lot of bug fixes
new features.

Special thanks go to all our contributors and users to help make this
happen over the last month :slight_smile:

Here goes the complete change log for this release, as compared to the
stable release,, released nearly a month ago:

  • upgraded the Nginx core to 1.0.8.
  • upgraded LuaNginxModule to 0.3.1rc23.
    • feature: added new directive lua_shared_dict:
      Lua | NGINX
    • feature: added Lua API for the shm-based dictionary:
      Lua | NGINX
    • feature: now we apply the patch to the nginx core so as to allow
      main request body modifications.
    • feature: added new Lua API ngx.req.set_body_file():
      Lua | NGINX
    • feature: added new Lua API ngx.req.set_body_data():
      Lua | NGINX
    • feature: added new Lua functions ngx.req.read_body(),
      ngx.req.discard_body(), ngx.req.get_body_data(), and
      ngx.req.get_body_file(). see the docs here:
      Lua | NGINX
    • feature: now we implemented ngx.req.set_uri() and
      ngx.req.set_uri_args() to emulate ngx_rewrite’s rewrite directive
      (without redirect or permanent modifiers). thanks Vladimir
      (utros) and Nginx U…
    • feature: added constant ngx.HTTP_METHOD_NOT_IMPLEMENTED (501).
      thanks Nginx U…
    • feature: now for HTTP 1.0 requests, we disable the automatic
      buffering mode if the user sets the Content-Length response header
      before sending out the headers. this allows streaming output for
      HTTP 1.0
      requests if the content length can be calculated beforehand.
      thanks Li Ziyi.
    • bugfix: now we properly support setting the Cache-Control
      header via the ngx.header.HEADER interface.
    • bugfix: no longer set header hash to 1. use the
    • bugfix: now we skip rewrite phase Lua handlers altogether if
      ngx_rewrite’s rewrite directive issue a location re-lookup by
      changing URIs (but not including rewrite … break). thanks Nginx
    • bugfix: fixed hanging issues when using ngx.exec() within
      rewrite_by_lua and access_by_lua. thanks Nginx U. for reporting
    • bugfix: lua_need_request_body should not skip requests with
      other than POST and PUT. thanks Nginx U…
    • bugfix: ndk.set_var.DIRECTIVE had a memory issue and might pass
      empty argument values to the directive being called. thanks
    • bugfix: no longer free request body buffers that are not
      by ourselves.
    • bugfix: now we allow setting ngx.var.VARIABLE to nil.
    • bugfix: now we explicitly clear all the modules’ contexts before
      dump to named location with ngx.exec. thanks Nginx U…
  • upgraded EchoNginxModule to 0.37rc7.
    • bugfix: fixed a memory issue in both echo_sleep and
      echo_blocking_sleep: we should not pass ngx_str_t strings to
      atof()which expects C strings.
    • bugfix: now we explicitly clear all the modules’ contexts before
      dump to named location with echo_exec.
    • bugfix: bugfix: echo_exec may hang when running after
      echo_sleep(or other I/O interruption calls): we should have called
      ngx_http_finalize_request on NGX_DONE to decrement
    • bugfix: now we properly set the Content-Length request header
  • upgraded SrcacheNginxModule to 0.13rc2.
    • feature: implemented response status line and general response
      header cachin and added new directives srcache_store_hide_header
      srcache_store_pass_header to control which headers to cache and
    • feature: added new directive srcache_response_cache_control to
      control whether honor response headers Cache-Control and Expires,
      default on.
    • feature: we disable srcache_store automatically by default
      when Cache-Control:
      max-age=0 and Expires: are seen.
    • feature: implemented builtin nginx variable $srcache_expire for
      automatic expiration time calculation based on response headers
      Cache-Control (max-age) and Expires; also added new directives
      srcache_max_expire and srcache_default_expire.
    • feature: implemented the srcache_store_no_cache directive; now
      default, we do not store responses with the header Cache-Control:
      no-cache into the cache.
    • feature: implemented the srcache_store_no_store directive
      off). Now by default, responses with the header Cache-Control:
      no-store will not be stored into the cache.
    • feature: implemented the srcache_store_private directive to
      whether to store responses with the header Cache-Control: private.
    • feature: implemented the srcache_request_cache_control directive
      allow request headers Cache-Control: no-cache or Pragma: no-cache
      force bypassing cache lookup. it also honors the request header
      no-store. this directive is turned off by default.
    • feature: now we check response header Content-Encoding by
      and a non-empty header value will skip srcache_store; also
      a new directive named srcache_ignore_content_encoding to ignore
      response header.
    • feature: implemented the srcache_methods directive to specify
      request methods that are cacheable, by default, only GET and HEAD
    • bugfix: we no longer set header hash to 1; we use
    • bugfix: when we skip srcache_fetch by means of
      we should not automatically skip srcache_store.
    • bugfix: now we ignore the Content-Length header (if any) of the
      main request for the subrequests.
    • bugfix: there might be a segfault when failing to allocate
      in ngx_http_srcache_add_copy_chain. thanks Shaun savage.
    • feature: implemented new directive srcache_store_statuses to
      the user to specify the response status code list that is to be
      stored into
      the cache.
    • bugfix: we now only cache 200, 301, and 302 responses by
  • upgraded IconvNginxModule to 0.10rc5.
    • bugfix: fixed -Wset-but-not-used warnings issued by gcc 4.6.0.
      thanks Zhi Jiale (Calio).
  • upgraded HeadersMoreNginxModule to 0.16rc3.
    • bugfix: we should set header hash using ngx_hash_key_lc, not
      to 1.
    • bugfix: fixed setting Cache-Control response headers. we should
      properly prepare the r->cache_control array as well.
  • upgraded RdsJsonNginxModule to 0.12rc6.
    • bugfix: fixed compatibility with nginx 1.1.4+.
  • upgraded RdsCsvNginxModule to 0.04.
    • bugfix: fixed compatibility issues with nginx 1.1.4+.
    • optimization: now we only register our filters when rds_csv is
      actually used in nginx.conf.
  • upgraded Redis2NginxModule to 0.08rc1.
    • bugfix: fixed compatibility with nginx 1.1.4+.
  • upgraded DrizzleNginxModule to 0.1.2rc2.
    • bugfix: fixed compatibility with nginx 1.1.4+
  • upgraded MemcNginxModule to 0.13rc1.
    • bugfix: fixed compatibility with nginx 1.1.4+.
  • upgraded SetMiscNginxModule to v0.22rc3.
    • minor code cleanup.
  • applied the patch to the Nginx core that always clears all modules’
    contexts in ngx_http_named_location.
  • applied the patch for the variable-header-ignore-no-hash issue. see
    [PATCH] Ignore response header entries with zero hash in ngx_http_varaible_headers for details.

As always, you’re welcome to report bugs and feature requests either
or directly to me :slight_smile:

It’ll also be highly appreciated to try out the devel releases (based on
the Nginx core 1.0.9+) that are coming out later :wink:

OpenResty (aka. ngx_openresty) is a full-fledged web application server
bundling the standard Nginx core, lots of 3rd-party Nginx
as well as most of their external dependencies.

By taking adantage of various well-designed Nginx modules, OpenResty
effectively turns the nginx server into a powerful web app server, in
the web developers can use the Lua programming language to script
existing nginx C modules and Lua modules and construct extremely
high-performance web applications that is capable to handle 10K+

OpenResty aims to run your server-side web app completely in the Nginx
server, leveraging Nginx’s event model to do non-blocking I/O not only
the HTTP clients, but also with remote backends like MySQL, PostgreSQL,
Memcached, and Redis.

You can find more details on the homepage of ngx_openresty here:

Have fun!


2011/11/3 agentzh [email protected]