bugfix: segmentation fault might happen in nginx 1.4.x when calling ngx.req.set_header on the Cookie request headers because recent versions of nginx no longer always initialize r->headers_in.cookies. thanks Rob W for reporting this issue as #237.
bugfix: no longer automatically turn underscores (_) to dashes (-) in header names for ngx.req.set_header and ngx.req.clear_header. thanks aviramc for the report.
fixed a test that may time out unexpectedly.
added custom test scaffold t::TestNginxLua which subclasses Test::Nginx::Socket. it supports the environment TEST_NGINX_INIT_BY_LUA which can be used to add more custom Lua code to the value of the init_by_lua directive in the nginx configuration.
refactor: save the ngx_log_t pointer instead of the ngx_http_request_t pointer in ngx_http_lua_script_engine_t. this will make the new FFI-based Lua API easier to implement.
refactor: made the error messages for replacement template compilation failures less verbose in ngx.re.sub and ngx.re.gsub.
bugfix: a test case would fail when TEST_NGINX_PORT was set to port numbers other than 1985.
added (passing) tests for use of the $invalid_referer variable in Lua. this requires the patch invalid_referer_hash for the nginx core (for now). thanks Fry-kun for reporting this issue as github #239.
updated docs to reflect recent changes.
bugfix: use of LuaJIT FFI when disabling the Lua code cache would lead to LuaJIT GC assertion failures like "g->gc.total == sizeof(GG_State)" because we unloaded the standard "ffi" module. thanks Ron Gomes for reporting this issue.
Revert "bugfix: use of LuaJIT FFI when disabling the Lua code cache would lead to LuaJIT GC assertion failures like "g->gc.total == sizeof(GG_State)" because we unloaded the standard "ffi" module. thanks Ron Gomes for reporting this issue."

Preventing unloading "ffi" does not reallys solve the issue here because
we can end up with FFI ctype redefinition errors.

This reverts commit b3218be26612282109897651ed5ccd4ab18a9e06.
tests: replaced the domain name "direct.agentzh.org" with "agentzh.org".
fixed failing test cases to reflect the multi-value header change in nginx 1.4.1.
updated .gitignore a bit.
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.
bugfix: ngx.flush(true) might not return 1 on success.
updated docs to reflect recent changes.
optimize: avoided use of the nginx request objects in ngx.escape_uri, ngx.unescape_uri, ngx.quote_sql_str, ngx.decode_base64, ngx.encode_base64, and ngx.decode_args.
optimize: avoided use of the nginx request objects in ngx.encode_args.
updated README.markdown to reflect recent changes in docs.