OpenResty® 通过 Lua 扩展 NGINX 实现的可伸缩的 Web 平台

OpenResty XRay

Advanced observability built for OpenResty and more

×

limited time offer

Request TRIAL today and receive a diagnostic REPORT
Learn more

ChangeLog 1.9.7

Yichun Zhang (agentzh) , 31 May 2016 (created 25 Dec 2015)

Version 1.9.7.5 - 31 May 2016

  • bugfix: applied the patch for nginx security advisory (CVE-2016-4450).
  • win32: now we use the latest MinGW gcc 4.9.3 to build the official Windows binaries.

Version 1.9.7.4 - 16 March 2016

  • bugfix: ./configure: use of relative paths like "./nginx" in --prefix=PATH led to compilation errors. thanks Tao Huang for the report.
  • upgraded Lua Nginx Module to 0.10.2.
    • feature: the C implementation for set SSL private keys now supports non-RSA private keys as well. thanks Alessandro Ghedini for the patch.
    • feature: ngx.log() and print() now accept Lua tables with the __tostring metamethod.
    • feature: added new API, ngx.config.subsystem, which always takes the Lua string value "http" in this module.
    • feature: added new API function ngx.socket.stream() which is an alias to ngx.socket.tcp().
    • feature: added HTTP 2.0 support to ngx.req.http_version().
    • feature: this module can now be built as a "dynamic module" with NGINX 1.9.11+ via the --add-dynamic-module=PATH option of ./configure.
    • bugfix: balancer_by_lua* did not respect "lua_code_cache off". thanks XI WANG for the report and Dejiang Zhu for the patch.
    • bugfix: hot loop might happen when balancer_by_lua* was used with the keepalive directive. thanks GhostZch for the report.
    • bugfix: balancer_by_lua* might crash the nginx worker when SSL (https) is used for upstream connections. thanks Alistair Wooldrige for the report.
    • bugfix: stream-typed cosockets: we did not set the "error" field of the ngx_connection_t object which MIGHT lead to socket leaks.
    • bugfix: avoided a potential memory issue when the request handler is aborted prematurely (via ngx.exit, for example) while a light thread is still waiting on ngx.flush(true).
    • bugfix: we might not respond to client abort events when lua_check_client_abort is on.
    • bugfix: fixed the compiler warning "unused variable" when compiling with nginx cores older than 1.7.5 (exclusive). thanks Marc Neudert for the patch.
    • bugfix: fixed compilation errors with LibreSSL by disabling ssl_certificiate_by_lua* and some ngx.ssl API functions that are not supported by LibreSSL. thanks George Liu and Bret for the reports.
    • bugfix: fixed compilation errors with nginx 1.9.11+. thanks Charles R. Portwood II and Tomas Kvasnicka for the reports.
    • bugfix: fixed compatibility issues with other nginx modules loaded as "dynamic modules" in NGINX 1.9.11+.
    • bugfix: SSL: set error message on i2d_X509() failure as well. thanks Alessandro Ghedini for the patch.
    • bugfix: SSL: remove leading white space from error messages. thanks Alessandro Ghedini for the patch.
    • optimize: use lua_pushliteral() for string literals. thanks Tatsuhiko Kubo for the patch.
    • change: unmatched submatch captures are now set to false instead of nil in the captures table (named captures are not affected). thanks Julien Desgats for the patch.
    • change: ngx.req.get_post_args: returns error message instead of raising an exception when request body is in temp file. thanks yejingx for the patch.
    • change: ngx.shared.DICT: throws a Lua error when the exptime argument is invalid.
    • doc: documented that ngx.req.get_body_data() is available in the context of log_by_lua*. thanks YuanSheng Wang for the patch.
    • doc: added balancer_by_lua* and ssl_certificate_by_lua* to the context of some Lua API functions. thanks Dejiang Zhu for the patch.
    • doc: fixed the documentation of log_by_lua* which actually runs after nginx's access log handler.
    • doc: updated the documentation for ngx.req.discard_body() to reflect recent changes. now ignoring request bodies indeed trigger discarding the body upon request finalization.
    • doc: updated the docs of ngx.get_phase() for new Lua execution contexts. thanks Thibault Charbonnier for the patches.
    • doc: typo fix in sample configurations from othree.
    • doc: typo fix in sample configurations from Adam Malone.
    • doc: typo fix from Prayag Verma.
    • doc: typo fix from leemingtian.
  • upgraded Lua Resty Core Library to 0.1.5.
    • optimize: ngx.ssl: removed unnecessary request checks from the priv_key_pem_to_der and cert_pem_to_der functions to allow them to be used in more contexts. thanks Tom Thorogood for the patch.
    • bugfix: resty.core.regex: non-string values passed as string arguments might throw out Lua errors. thanks Robert Paprocki for the patch.
    • change: resty.core.shdict: throws out a Lua error when the exptime arg is invalid.
    • change: resty.core.regex: unmatched submatch captures are set to false instead of nil in captures table. thanks Julien Desgats for the patch.
    • doc: typo fix from thefosk.
    • doc: typo fix from Anton Ovchinnikov.
  • upgraded Lua Upstream Nginx Module to 0.05.
    • feature: expose peer connection count as the "conns" Lua table field. thanks Justin Li for the patch.
    • feature: this module can now be built as a "dynamic module" with NGINX 1.9.11+ via the --add-dynamic-module=PATH option of ./configure. thanks Hiroaki Nakamura for the original patch.
    • doc: fixes from Justin Li.
  • upgraded Lua Resty Upstream Healthcheck Library to 0.04.
    • feature: added IPv6 address support in upstream peer names. thanks szelcsanyi for the patch.
    • feature: status_page(): now we mark those upstream blocks without any (live) health checkers so as to avoid potential confusions when the checker light threads were aborted due to some fatal errors.
    • refactor: various coding refactoring to improve code readability. thanks Thijs Schreijer and Dejiang Zhu for the patches.
    • optimize: minor Lua code improvements from Aapo Talvensaari.
    • doc: link fixes from Thijs Schreijer.
    • doc: fixed escaping issues in the configuration samples in the Synopsis section by migrating to the "*_by_lua_block {}" directives. thanks whatacold for the report.
  • upgraded Lua Resty DNS Library to 0.15.
  • upgraded Resty CLI to 0.06.
    • feature: resty: added new options --http-include=PATH and --main-include=PATH to include user files in the auto-generated nginx.conf file. thanks Nils Nordman for the patch.
  • upgraded Set Misc Nginx Module to 0.30.
    • feature: this module can now be compiled as a dynamic module with NGINX 1.9.11+ via the --with-dynamic-module=PATH option of ./configure.
    • bugfix: fixed errors and warnings with C compilers without variadic macro support.
  • upgraded Array Var Nginx Module to 0.05.
    • feature: this module can now be compiled as a dynamic module with NGINX 1.9.11+ via the --with-dynamic-module=PATH option of ./configure.
    • bugfix: fixed errors and warnings with C compilers without variadic macro support.

Version 1.9.7.3 - 28 January 2016

Version 1.9.7.2 - 21 January 2016

  • feature: applied the ssl_cert_cb_yield patch to the bundled version of the NGINX core to allow yielding in OpenSSL's SSL_CTX_set_cert_cb() callbacks (needed by Lua Nginx Module's ssl_certificate_by_lua* directives, for example).
  • bugfix: the ./configure options --with-dtrace-probes and --with-stream did not work together and led to compilation failures.
  • upgraded Lua Nginx Module to 0.10.0.
    • feature: better SSL/TLS handshake control.
      • implemented the ssl_certificate_by_lua_block and ssl_certifcate_by_lua_file directives for controlling the NGINX downstream SSL handshake dynamically with Lua. thanks Piotr Sikora, Zi Lin, yejingx, and others for the help.
      • added an optional send_status_req argument to stream-typed cosockets' sslhandshake() method to send OCSP status request.
    • feature: implemented the balancer_by_lua_block and balancer_by_lua_file directives to allow NGINX load balancers written in Lua. thanks Shuxin Yang, Dejiang Zhu, Brandon Beveridge, and others for the help.
    • feature: added pure C API for the ngx.semaphore Lua module implemented in lua-resty-core. this ngx.semaphore API provides efficient synchronization among "light threads" across request/context boundaries. thanks Weixie Cui and Dejiang Zhu from Kugou Inc. for contributing this feature. also thanks Kugou Inc. for supporting this work.
    • doc: made clear the ngx.ctx scoping issues. thanks Robert Paprocki for asking.
    • doc: typo fix for the contexts of ngx.worker.id. thanks RocFang for the patch.
  • upgraded Lua Resty Core Library to 0.1.4.
    • feature: added new Lua modules ngx.ssl and ngx.ocsp. these two modules provide Lua API mostly useful in the context of Lua Nginx Module's ssl_certificiate_by_lua*. thanks Piotr Sikora, Zi Lin, yejingx, Aapo Talvensaari, and others for the help.
    • feature: implemented the ngx.balancer Lua module to support dynamic nginx upstream balancers written in Lua. the ngx.balancer module is expected to be used in Lua Nginx Module's balancer_by_lua* context. thanks Shuxin Yang, Aapo Talvensaari, and Guanlan Dai for the help.
    • feature: feature: added new Lua module, ngx.semaphore. this ngx.semaphore API provides efficient synchronization among "light threads" across request/context boundaries. thanks Weixie Cui and Dejiang Zhu from Kugou Inc. for contributing this feature. Also thanks Kugou Inc. for supporting this work.
  • upgraded LuaJIT to v2.1-20160108: https://github.com/openresty/luajit2/tags
    • imported Mike Pall's latest changes:
      • FFI: properly unsink non-standard cdata allocations.
      • ARM: added external frame unwinding. thanks to Nick Zavaritsky.
      • MIPS soft-float support. contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. sponsored by Cisco Systems, Inc.
        • added soft-float support to interpreter.
        • added soft-float FFI support.

Version 1.9.7.1 - 25 December 2015

  • upgraded the Nginx core to 1.9.7.
  • ./configure: now we automatically set the environment MACOSX_DEPLOYMENT_TARGET to the current Mac OS X version (unless the environment is already set) to ensure the LuaJIT build uses the current versions of the system libraries. thanks bsyk for the report.
  • win32: use Windows line breaks in the resty script file of the binary distribution.
  • win32: upgraded pcre to 8.38 and openssl to 1.0.2e.
  • win32: enabled ngx_http_realip_module, ngx_http_addition_module ngx_http_sub_module, and ngx_http_stub_status_module in the win32 binary package by default.
  • upgraded Lua Nginx Module to 0.9.20.
    • feature: added new API functions ngx.worker.count() and ngx.worker.id() for returning the total count of nginx worker processes and the ordinal number (0, 1, 2, and etc) of the current worker. thanks YuanSheng Wang for the patch. also added pure C API for them.
    • feature: added new API functions ngx.timer.pending_count() and ngx.timer.running_count(). thanks Simon Eskildsen for the patch.
    • feature: added new config directive access_by_lua_no_postpone. thanks Delta Yeh for the patch.
    • feature: added new constant ngx.HTTP_TEMPORARY_REDIRECT (307) and support for 307 in ngx.redirect(). thanks RocFang for the patch.
    • feature: added new API function ngx.req.is_internal() for testing if the current request is an internal request. thanks Ruoshan Huang for the patch.
    • feature: added many more HTTP status constants as ngx.HTTP_XXX. thanks Vadim A. Misbakh-Soloviov for the patch.
    • bugfix: bogus nginx.conf parse failure "Lua code block missing the "}" character" might happen when there are many Lua code blocks inlined. thanks Andreas Lubbe for the report.
    • bugfix: bogus "subrequests cycle" errors might occur with nginx 1.9.5+ due to the recent changes in the nginx core.
    • bugfix: ngx.req.get_uri_args/ngx.req.get_post_args: avoided allocating a zero-size buffer in the nginx memory pool since it might cause problems. thanks Chuanwen Chen for the report and patch.
    • bugfix: modifying the built-in header X-Forwarded-For via ngx.req.set_header() or ngx.req.clear_header() might not take effect in some parts of the nginx core (like $proxy_add_x_forwarded_for). thanks aviramc for the patch.
    • bugfix: we lacked detailed context info in error messages due to use of disabled Lua API in body_filter_by_lua*. thanks Dejiang Zhu for the patch.
    • bugfix: fixed a potential data alignment issue in the ngx.var setter API.
    • bugfix: we had data alignment issues in the subrequest API which can explode on systems like ARM. thanks Stefan Parvu for providing the test environment.
    • bugfix: there was a data alignment issue in the tcpsock:setkeepalive() implementation which might lead to crashes on ARM systems. thanks Stefan Parvu for the report.
    • bugfix: fixed C compiler warnings "comparison between signed and unsigned integer expressions" on Windows.
    • optimize: avoided allocating in the nginx request memory pool in stream-typed cosockets' receive*() methods. thanks Lourival Vieira Neto for the patch.
    • optimize: reduced memory allocations in stream-typed cosockets. thanks Dejiang Zhu for the patch.
      • avoided allocating the host name buffer when getting peers from the connection pool.
      • recycled the stream cosockets' request cleanup records.
    • doc: documented the minimum size threshold in lua_shared_dict. thanks mlr3000 for the original patch.
  • upgraded Lua Resty Core Library to 0.1.3.
    • Makefile: added support for relative paths in LUA_LIB_DIR.
    • minor code adjustments from Aapo Talvensaari.
  • upgraded Headers More Nginx Module to 0.29.
  • upgraded Lua Resty Redis Library to 0.22.
    • tweaked Makefile to allow relative paths in LUA_LIB_DIR when DESTDIR is not specified.
    • optimize: moved string concatenation for the Redis request construction onto the C land (taking advantage of the feature that cosockets' send method accepts a table of strings). thanks Dejiang Zhu for the patch.
    • optimize: minor optimizations from Aapo Talvensaari.
  • upgraded Resty CLI to 0.05.
    • bugfix: resty: nginx might report the error "The system cannot find the file specified" in CreateFile() on Windows XP. thanks cover_eye for the report.
  • upgraded LuaJIT to v2.1-20151219: https://github.com/openresty/luajit2/tags
    • Makefile: ensure we always install the symbolic link for the "luajit" file.
    • imported Mike Pall's latest changes:
      • FFI: Fix SPLIT pass for CONV i64.u64.
      • x64/LJ_GC64: Fix stack growth in vararg function setup.
      • DynASM/x86: Add rdpmc instruction.
      • OSX: Switch to Clang as the default compiler.
      • iOS: Disable os.execute() when building for iOS >= 8.0.
      • x86/x64: Disassemble AVX/AVX2 instructions.
      • DynASM/x86: Add AVX and AVX2 opcodes.
      • DynASM/x86: Add AES-NI opcodes.
      • DynASM/x86: Restrict shld/shrd to operands with same width.
      • DynASM/x86: Fix some SSE instruction templates.
      • Fix pairs() recording.
      • FFI: Fix ipairs() recording.
      • Drop marks from replayed instructions when sinking. See ChangeLog 1.9.3 for change log for OpenResty 1.9.3.x.