feature: stream-typed cosockets are now full-duplex: a reader "light thread"
and a writer "light thread" can operate on the same cosocket
simultaneously. thanks shun zhang and aviramc for the original patches.
feature: added new API function ngx.thread.kill() for killing a user "light thread". thanks aviramc for the original patch.
bugfix: the "coroutine" module table introduced by require('coroutine')
was not working in our Lua context. thanks Paul K and Pierre-Yves Gérardy for the report.
bugfix: fixed the initial size of the ngx.worker table and the
misleading comment due to a copy&paste mistake. thanks Suraj Jaiswal
for the report.
bugfix: the "coctx cleanup" handler might not
be called before being overidden by other operations. this could happen
when failing to yield in an error handler (for xpcall).
bugfix: fixed an incorrect error message. thanks doujiang for the patch.
bugfix: fixed a compilation error regression when using the Microsoft Visual C/C++ compiler. thanks itpp16 for the patch.
bugfix: we should use c->buffered & NGX_HTTP_LOWLEVEL_BUFFERED
instead of c->buffered
for testing if the downstream connection is busy writing.
bugfix: we did not handle an out-of-memory case in ngx.req.set_body_data().
bugfix: ngx_http_lua_chain_get_free_buf(): avoided returning zero-sized memory bufs.
bugfix: body_filter_by_lua*:
we might incorrectly pass zero-size bufs (in the form of "special sync
bufs") at the beginning of a chain, which could get stuck in the buffer
of ngx_http_writer_filter_module
(or in other words, being "busy") while could still get recycled in the content handler (like content_by_lua), leading to buffer corruptions. thanks westhood for the report and patch.
bugfix: we did not clear all the fields in the ngx_buf_t
C struct when recycling chain link buffers.
bugfix: the *_by_lua_file
directives failed to load .lua files of exactly the size n*LUAL_BUFFERSIZE
bytes with the error "'end' expected (to close 'function' at line 1) near '<eof>'". thanks kworr for the report.
change: now we always iterate through all the user light threads to
ensure all threads are de-anchored even when the "uthreads" counter gets
out of sync. also added an assertion on the "uthreads" counter.
change: now we turn off our C-land assertions by default unless the user explicitly specifies the C compiler option -DNGX_LUA_USE_ASSERT
.
change: throw out the "no memory" Lua error consistently (instead of
"out of memory") when failing to allocate on the nginx side.
change: we now still call ngx_pfree()
in our own pcre_free
hook.
doc: documented the NGX_LUA_USE_ASSERT
and NGX_LUA_ABORT_AT_PANIC
C macros.
doc: added performance notes to the sections for the ngx.var and ngx.ctx API.
doc: documented the types of Lua values that can be passed to the ngx.timer callback functions.