Ngx_openresty devel version 1.2.1.7 released

Hi, folks!

After 10 days’ active development, I’m pleased to announce the new
development version of ngx_openresty, 1.2.1.7:

OpenResty® - Open source

This release features the new UDP and datagram unix domain cosocket
API in the ngx_lua module.

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

  • upraded HeadersMoreNginxModule to 0.17.

    • bugfix: more_clear_input_headers did not remove all the
      instances for the built-in headers or custom headers.

    • bugfix: more_clear_input_headers might accidentally remove
      request headers that were not specified at all and left the
      specified headers with just empty header values when
      removing multiple built-in headers. thanks Matthieu T.
      for reporting the issues.

  • upgraded LuaNginxModule to 0.5.7.

    • feature: added an optional “option table” to
      tcpsock:connect() which accepts a “pool” option to allow the
      user specify a custom pool name intead of the automatically
      generated one based on the host-port pair or the socket file
      path. thanks Brian A. for the patches.

    • feature: implemented the UDP/unix-datagram cosocket API. the
      entry point is ngx.socket.udp. we preserve API compatibility
      with the LuaSocket library but everything is non-blocking in
      our implementation.

    • feature: added new Nginx API for Lua:
      ngx.req.set_method(method_id) and ngx.req.get_method. thanks
      Matthieu T. for suggesting these.

    • bugfix: the tcp/stream-unix cosocket object might hang when
      another concurrent request is accessing it while its
      operation is still in progress; now we always check for
      potential access conflicts and return the “socket busy”
      error string if it is indeed the case.

    • bugfix: the tcpsock:connect() method always returned the
      (vague) error strng “connect peer error” instead of the
      (detailed) system error string when the connect syscall
      failed.

    • bugfix: the TCP/stream-unix cosocket object might go wrong
      after it connected successfully in a single run (that is, no
      “EAGAIN” returned in the middle) and DNS domain names were
      used.

    • bugfix: tcpsock:receive() and tcpsock:send() always returned
      “error” as the error message instead of the (detailed)
      system error string.

    • bugfix: ngx.req.clear_header() did not remove all the
      instances for the built-in headers or custom headers.

    • bugfix: ngx.req.clear_header() might accidentally remove
      request headers that are not specified at all and left the
      specified headers with just empty header values when
      removing multiple built-in headers. thanks Matthieu T.
      for reporting the issues.

    • bugfix: we did not always test if the request object pointer
      is null in the “ngx.req.*_body” API.

    • bugfix: ngx.exec() did not accept the “nil” value for its
      second (optional) argument.

    • bugfix: “ngx.exit(404/500/…)” would throw out Lua errors
      when the response headers with exactly the same status code
      had already been sent. thanks Matthieu T. for reporting
      this.

    • bugfix: gcc might issue the “unused variable” warning when
      PCRE was disabled. thanks Dirk Feytons for the patch.

  • upgraded LuaRestyRedisLibrary to 0.11.

    • feature: added the “array_to_hash” method. thanks Brian
      Akins for the patch in github #8.
  • upgraded LuaRestyMySQLLibrary to 0.09.

    • feature: added the “compact_arrays” option to the
      “connect()” method to make the driver return arrays of
      arrays instead of the (default) arrays of hashes. thanks
      Lance Li for requesting this feature.

    • feature: added new method “set_compact_arrays” to change the
      current “compact_arrays” option value used by the current
      object for subsequent queries. thanks Lance Li for
      suggesting it.

    • feature: added the “pool” option to the “connect()” method.

    • bugfix: connections to different MySQL databases and/or
      different MySQL users would incorrectly share the same
      connection pool as long as they were connecting to the same
      MySQL server. thanks lhmwzy for reporting the issue.

    • docs: fixed the “path” option value for the “connect()”
      method in README. it should not take the “unix:” prefix.
      thanks Lance Li.

    • docs: documented that storing the object instance into lua
      module-level variables will result in failures for
      concurrent requests.

    • docs: documented that this library cannot be used in those
      contexts where the cosocket API is unavailable.

  • upgraded the standard Lua interpreter to 5.1.5.

  • disabled the Lua 5.0 compatibility in the standard Lua
    interpreter bundled.

The HTML version of this change log with some useful hyper-links can be
browsed here:

OpenResty® - Open source

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

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

http://openresty.org/

Enjoy!
-agentzh