feature: added new method get_stale to shared dict objects, which returns the value (if not freed yet) even if the key has already expired. thanks Matthieu Tourne for the patch.
bugfix: segfault might happen when reading or writing to a response header via the ngx.header.HEADER API in the case that the nginx core initiated a 301 (auto) redirect. this issue was caused by an optimization in the Nginx core where ngx_http_core_find_config_phase, for example, does not fully initialize the "Location" response header after creating the header. thanks Vladimir Protasov for the report.
bugfix: memory leak would happen when using the ngx.ctx API before another Nginx module (other than Lua Nginx Module) initiates an internal redirect.
bugfix: use of the ngx.ctx table in the context of ngx.timer callbacks would leak memory.
bugfix: the "connect() failed" error message was still logged even when lua_socket_log_errors was off. thanks Dong Fang Fan for the report.
bugfix: we incorrectly returned the 500 error code in our output header filter, body filter, and log-phase handlers upon Lua code loading errors.
bugfix: Lua stack overflow might happen when we failed to load Lua code from the code cache.
bugfix: the error message was misleading when the *_by_lua_file config directives failed to load the Lua file specified.
bugfix: give the argument of 'void' to function definitions which has no arguments. thanks Tatsuhiko Kubo for the patch.
bugfix: when our at-panic handler for Lua VM gets called, the Lua VM is not recoverable for future use. so now we try to quit the current Nginx worker gracefully so that the Nginx master can spawn a new one.
bugfix: segfault might happen when using more_set_headers or more_clear_headers in the case that the Nginx core initiated a 301 (auto) redirect. this issue was caused by an optimization in the Nginx core where ngx_http_core_find_config_phase, for example, does not fully initialize the "Location" response header after creating the header. thanks Brian Akins for the report.
bugfix: we did not always read the client request body before initiating srcache_fetch subrequests at the "access phase", which could lead to bad consequences.
bugfix: the request body was not discarded properly in the content handler when the request body was not read yet. thanks Peter Sabaini for the report.
bugfix: we did not ensure that the main request body is always read before subrequests are initiated, which could lead to bad consequences.
bugfix: $echo_client_request_headers may evaluate to an empty value when the default header buffer (c->buffer) can hold the request line but not the whole header. thanks KDr2 for reporting this issue.
docs: fixed a typo in Synopsis reported by saighost.
docs: use https for github links. thanks Olivier Mengué for the patch.
change: made ngx.say/ngx.print/ngx.eof/ngx.flush/ngx.send_headers return nil and a string describing the error in case of most of the common errors (instead of throwing out an exception), and return 1 for success.
feature: added new directive lua_regex_match_limit for setting PCRE's "match_limit" protection for regex execution.
feature: now we store the nginx request object as a named Lua global variable __ngx_req to help FFI-based Lua code directly access it.
bugfix: the ngx.ctx tables would leak memory when ngx.ctx, ngx.exec()/ngx.req.set_uri(uri, true), and log_by_lua were used together in a single location. thanks Guanlan Dai for writing the gdb utils to catch this.
bugfix: setting ngx.var.VARIABLE could lead to buffer over-read in luaL_error when an error happened.
bugfix: tcpsock:send("") resulted in the error log alert message "send() returned zero".
bugfix: ngx.flush(true) might not return 1 on success.
bugfix: when compiling with -DDDEBUG=1, there was a compilation error. thanks tigeryang for the report.
optimize: no longer store cf->log into the Lua registry table because we can always directly access the global ngx_cycle->log thing.
refactor: added inline functions ngx_http_lua_get_req and ngx_http_lua_set_req to eliminate code duplication when storing or fetching the nginx request object from the lua global variable table.
docs: typo fixes in the code sample for body_filter_by_lua. thanks cyberty for the patch.
docs: mentioned my Nginx Systemtap Toolkit which is very useful for online debugging on Linux.
bugfix: segmentation fault might happen in Nginx 1.4.x when using the more_set_input_headers directive on the Cookie request headers because recent versions of Nginx no longer always initialize r->headers_in.cookies.
See ChangeLog 1.2.8 for change log for OpenResty 1.2.8.x.