OpenResty® Scalable Web Platform by Extending NGINX with Lua

New! New blog post Share Data Across Requests Served by OpenResty is published.
New! New blog post Install OpenResty on CentOS 8 via dnf is published.
New! Test::Nginx 0.29 is now released!
New! OpenResty 1.19.3.1 is now released!

OpenResty 1.19.3.1 RC1 is out

Johnny Wang , 28 Oct 2020 (created 28 Oct 2020)

We have just kicked out a new release candidate, OpenResty 1.19.3.1 RC1, for the community to test out.

Source package

https://openresty.org/download/openresty-1.19.3.1rc1.tar.gz

PGP for this source tarball:

https://openresty.org/download/openresty-1.19.3.1rc1.tar.gz.asc

Windows binary packages

Win64 version:

https://openresty.org/download/openresty-1.19.3.1rc1-win64.zip

PGP for the Win64 zip file:

https://openresty.org/download/openresty-1.19.3.1rc1-win64.zip.asc

Win32 version:

https://openresty.org/download/openresty-1.19.3.1rc1-win32.zip

PGP for the Win32 zip file:

https://openresty.org/download/openresty-1.19.3.1rc1-win32.zip.asc

Acknowledgments

Special thanks go to all our developers and contributors! Also thanks Thibault Charbonnier for his great help in preparing this release.

Version highlights

The highlights of this release candidate are:

  • Based on the very recent mainline NGINX core 1.19.3.
  • Many fixes imported from Mike Pall's upstream LuaJIT repository...
  • Optimize: now we recycle lua thread GC objects for our "light threads" and added lua_thread_cache_max_entries directive to configure the cache size.
  • Optimize: now we make use of the new lua_getexdata2 and lua_setexdata2 to attach coctx to the Lua thread objects directly which save the lookup overhead which can become the bottleneck when there are many Lua light threads around in a single request handler.
  • Feature: shared ngx.ctx among SSL_* phases and the following phases.
  • Feature: implemented the new ssl.verify_client() API to require a client certificate during TLS handshake.
  • Feature: added exit_worker_by* to run Lua code upon nginx worker process exit.
  • Feature: add the balancer.recreate_request function, which allows user to recreate request buffer in balancer phase.
  • Feature: supported receiveany on ngx.req.socket(true?) socks.
  • Feature: implemented the new ngx.ssl.server_port() API to get server port.

Full Changelog

  • upgraded the nginx core to 1.19.3.
  • upgraded ngx_lua to 0.10.18rc4.
    • feature: implemented the new tcpsock:setoption() function for setting options for the TCP socket. Thanks poorsea for the patch.
    • bugfix: ngx.resp.get_headers(): may return a wrong (like: negative) value of the Content-Length field when it is larger than 2^32. Thanks LubinLew for the patch.
    • optimize: added the "ev" to ngx_posted_delayed_events instead of the rbtree for 0 delay timer, so that we can save an epoll wait in such case. Thanks syz for the patch.
    • feature: implemented the new ngx.ssl.server_port() API to get server port. Thanks Yan Zhu for the patch.
    • bugfix: build error with nginx 1.7.4 or older version. Thanks timebug for the patch.
    • optimize: now we make use of the new lua_getexdata2 and lua_setexdata2 to attach coctx to the Lua thread objects directly which save the lookup overhead which can become the bottleneck when there are many Lua light threads around in a single request handler.
    • feature: now we recycle lua thread GC objects for our "light threads" and added lua_thread_cache_max_entries directive to configure the cache size.
    • feature: added new C API ngx_http_lua_pcre_version to wrap the pcre_version() C API in libpcre.
    • bugfix: double values larger than int32_t were incorrectly printed out as 64-bit integers. Thanks lijunlong for the patch.
    • bugfix: the format in argerror messages are incorrect. Thanks Alexander Drozdov for the patch.
    • feature: shared ngx.ctx among SSL_* phases and the following phases. Thanks spacewander for the patch.
    • feature(socket.tcp): enhance the logic of parameter verification in connect. Thanks Jinhua Tan for the patch.
    • bugfix: the body size may overflow since the size_t is only int32 in 32-bit system. Thanks syz for the patch.
    • feature: added the ngx_http_lua_ffi_balancer_recreate_request FFI function to allow recreation of request buffer in balancer phase. Thanks Datong Sun for the patch.
    • feature: add FFI interface to verify SSL client certificate. Thanks ArchangelSDY for the patch.
    • feature: added exit_worker_by* to run Lua code upon nginx worker process exit. Thanks letian & Jinhua Tan for the patch.
    • optimize: avoided use of lua_tolstring in ngx_http_lua_calc_strlen_in_table, ngx_http_lua_copy_str_in_table, ngx_http_lua_socket_udp_send, log_wrapper and ngx_http_lua_ngx_echo. Thanks lijunlong for the patch.
    • feature: supported receiveany on ngx.req.socket(true?) socks. Thanks Guy Lewin for the patch.
  • upgraded ngx_stream_lua to 0.0.9rc2.
    • feature: added the receiveany function for raw req socket. (#184) Thanks tangsty for the patch.
    • feature: implemented the new ngx.ssl.server_port() API to get server port. Thanks Yan Zhu for the patch.
    • feature: added new C API ngx_stream_lua_pcre_version to wrap the pcre_version() C API in libpcre.
    • feature: shared ngx.ctx among SSL_* phases and the following phases. Thanks spacewander for the patch.
    • bugfix: the stream subsystem was built incorrectly in debug mode. Thanks spacewander for the patch.
    • bugfix: hide get_request API in stream subsystem. Thanks spacewander for the patch.
    • feature: add FFI interface to verify SSL client certificate. Thanks ArchangelSDY for the patch.
  • upgraded lua-resty-core to v0.1.20rc3.
    • feature: implemented the new tcpsock:setoption() function for setting options for the TCP socket. Thanks poorsea for the patch.
    • feature: implemented the new ngx.ssl.server_port() API to get server port. Thanks Yan Zhu for the patch.
    • change: now we require ngx_http_lua 0.10.18 and ngx_stream_lua 0.0.9.
    • bugfix: resty.core.regex would fail to load silently on Windows. now we use ngx_http_lua or ngx_stream_lua modules' pcre version API wrapper to avoid such symbol exporting pains.
    • feature: shared ngx.ctx among SSL_* phases and the following phases. Thanks spacewander for the patch.
    • bugfix: added the missing 'ngx.req.start_time' to the stream subsystem. Thanks Thibault Charbonnier for the patch.
    • feature: add the balancer.recreate_request function, which allows user to recreate request buffer in balancer phase. Thanks Datong Sun for the patch.
    • feature: implemented the new ssl.verify_client() API to require a client certificate during TLS handshake. Thanks ArchangelSDY for the patch.
    • feature: add exit_worker as new phase. Thanks letian & Jinhua Tan for the patch.
  • upgraded lua-resty-mysql to 0.23rc1.
    • feature: support sha256 plugin to auth. Thanks Jinhua Tan for the patch.
    • feature: add connection backlog support. Thanks syz for the patch.
  • upgraded lua-resty-websocket to 0.08rc1.
    • optimization: using cdata instead lua table for generating masked payload. Thanks Gerrard-YNWA for the patch.
    • feature: support adding custom headers during handshake. Thanks Guilherme Salazar for the patch.
  • upgraded lua-resty-redis to 0.29.
    • bugfix: reimplement unsubscribe mechanism. Thanks spacewander for the patch.
    • bugfix: lack close() when receive timeout. Thanks stone-wind for the patch.
    • bugfix: connect to unix socket without opts table. Thanks Andreas Fischer for the patch.
  • upgraded resty-cli to 0.27rc4.
    • bugfix: --no-stream did not really work. this is a followup fix for the previous commit.
    • feature: resty: added new CLI option --no-stream to disable stream {} config in auto-generated nginx.conf.
    • change: resty: we no longer support arg[N] where N < 0.
    • bugfix: resty: the tmp directory has not been deleted. Thanks Johnny for the patch.
    • feature: resty: now we cache the original ngx.say/ngx.print functions into ngx.orig_say and ngx.orig_print since some times the user would need them.
  • upgraded LuaJIT to 2.1-20201008.
    • Detect SSE4.2 support dynamically.
    • feature: added new Lua API functions thread.exdata2 as well as C API funcs lua_getexdata2 and lua_setexdata2.
    • feature: added new LuaJIT C API lua_resetthread.
    • Patch for PPC64 support.
    • imported Mike Pall's latest changes:
      • Fix snapshot PC when linking to BC_JLOOP that was a BC_RET*.
      • Ensure full init of IR_NOP instructions.
      • Another fix for lua_yield() from C hook.
      • Mark CONV as non-weak, to prevent elimination of its side-effect.
      • Fix lua_yield() from C hook.
      • DynASM/x86: Fix VREG support.
      • Limit path length passed to C library loader.
      • LJ_GC64: Always snapshot functions for non-base frames.
      • Call error function on rethrow after trace exit.
      • Fix handling of errors during snapshot restore.
      • ARM: Ensure relative GG_State element alignment differently.
      • Fix Makefile dependencies.
      • Handle old OSX/iOS without getentropy().
      • Add FAQ about sandboxing. Minor fixes.
      • Fix frame traversal for __gc handler frames.
      • Fix Clang build.
      • Android/ARM: Fix build with recent NDK.
      • Fix compiler warning.
      • Fix OSX build.
      • Follow-up fix for iOS build.
      • OSX/iOS: Handle iOS simulator and ARM64 Macs.
      • Fix pointer check for non-GC64 mode.
      • Windows: Fix NtAllocateVirtualMemory prototype.
      • Add jit.security().
      • Redesign and harden string interning.
      • Use a securely seeded global PRNG for the VM.
      • Cleanup some arch defines and fix builds.
      • ARM: Implement FLOAD from GG_State.
      • Improve assertions.
      • Fix debug.debug() for non-string errors.
      • Optimize table length computation with hinting.
      • Remove pow() splitting and cleanup backends.
      • Cleanup math function compilation and fix inconsistencies.
      • Fix bytecode register allocation for comparisons.
      • Don't compile math.modf() anymore.
      • Fix math.min()/math.max() inconsistencies.
      • Fix narrowing of unary minus.
      • Cleanup CPU detection and tuning for old CPUs.
      • ARM64: Fix {AHUV}LOAD specialized to nil/false/true.
      • ARM, ARM64, PPC: Fix TSETR fallback.
      • Remove unused file.
      • FFI: Always fall back to metamethods for cdata length/concat.
      • Windows: Make actual use of internal allocator optimization.
      • Fix overflow check in unpack().
      • Fix Windows make clean.
      • FFI/ARM64: Fix pass-by-value struct calling conventions.
      • Fix write barrier for lua_setupvalue() and debug.setupvalue().
      • Make string to number conversions fail on NUL char.
      • x86/x64: Fix loop realignment.
      • Fix POSIX install with missing or incompatible ldconfig.
      • Fix C file generation in jit.bcsave.
      • Bump copyright date.
      • Remove support for de-facto dead archs.
      • DynASM/x86: Fix BMI instructions.
      • Minor fixes.
      • MIPS: Add MIPS64 R6 port.
      • Fix string.char() recording with no arguments.
      • Followup fix for embedded bytecode loader.
      • Fix embedded bytecode loader.

Feedback

Feedback on this new release candidate is most welcome. Feel free to create new GitHub issues or contact us via one of our mailing lists.