Yichun Zhang (agentzh)
8708f604f5
docs: typo fixes in the code sample for body_filter_by_lua. thanks cyberty for reporting this issue as #261 .
2013-07-15 12:31:03 -07:00
Yichun Zhang (agentzh)
fe467e52bc
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.
2013-07-15 00:08:42 -07:00
Yichun Zhang (agentzh)
a184a91112
util/build2.sh: default to nginx 1.4.1 now.
2013-07-14 23:52:16 -07:00
Yichun Zhang (agentzh)
76c2427ac5
test: made the resolver less possible to time out in two test cases.
2013-07-10 23:18:21 -07:00
Yichun Zhang (agentzh)
4656a290b3
docs: bumped version to 0.8.4; also mentioned Nginx Systemtap Toolkit.
2013-07-10 23:09:09 -07:00
Yichun Zhang (agentzh)
4d27348ccb
bugfix: tcpsock:send("") resulted in the error log alert message "send() returned zero".
2013-07-09 17:00:27 -07:00
Yichun Zhang (agentzh)
6977e95185
bugfix: setting ngx.var.VARIABLE could lead to stack buffer over-read in luaL_error when an error happened.
2013-07-08 16:52:17 -07:00
Yichun Zhang (agentzh)
5e256f8bf5
refactor: now we store the nginx request object as a named Lua global variable __ngx_req to help FFI-based Lua code access it.
2013-07-02 17:28:32 -07:00
Yichun Zhang (agentzh)
d82196f7fd
bugfix: t::TestNginxLua: env TEST_NGINX_INIT_BY_LUA would break existing init_by_lua_file directive in the test case.
2013-07-02 17:11:07 -07:00
Yichun Zhang (agentzh)
569cabe178
refactor: no longer store cf->log into the lua registry table because we can directly access the global ngx_cycle->log thing.
2013-07-01 19:11:02 -07:00
Yichun Zhang (agentzh)
d9e3e8feea
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.
2013-07-01 19:04:34 -07:00
Yichun Zhang (agentzh)
fe27fc2a4c
updated README.markdown to reflect recent changes in docs.
2013-07-01 19:03:42 -07:00
Yichun Zhang (agentzh)
f05ef37b99
optimize: avoided use of the nginx request objects in ngx.encode_args.
2013-07-01 18:20:18 -07:00
Yichun Zhang (agentzh)
5a0bb76e66
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.
2013-07-01 17:49:52 -07:00
Yichun Zhang (agentzh)
d8aa2fedac
updated docs to reflect recent changes.
2013-06-20 16:02:01 -07:00
Yichun Zhang (agentzh)
ff9580dd35
bugfix: ngx.flush(true) might not return 1 on success.
2013-06-18 22:47:37 -07:00
Yichun Zhang (agentzh)
5a880aea93
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.
2013-06-18 19:09:14 -07:00
agentzh (Yichun Zhang)
cf4f62a620
updated .gitignore a bit.
2013-06-10 16:33:14 -07:00
agentzh (Yichun Zhang)
b07a3d3c5f
fixed failing test cases to reflect the multi-value header change in nginx 1.4.1.
2013-06-10 16:33:05 -07:00
agentzh (Yichun Zhang)
f40a504274
tests: replaced the domain name "direct.agentzh.org" with "agentzh.org".
2013-06-08 22:55:36 -07:00
agentzh (Yichun Zhang)
34f4042f23
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 b3218be266
.
2013-06-07 12:43:24 -07:00
agentzh (Yichun Zhang)
b3218be266
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.
2013-05-30 16:20:02 -07:00
agentzh (Yichun Zhang)
39151875d7
updated docs to reflect recent changes.
2013-05-23 12:21:18 -07:00
agentzh (Yichun Zhang)
63a9915d33
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 .
2013-05-21 16:16:35 -07:00
agentzh (Yichun Zhang)
f50c7789bc
bugfix: a test case would fail when TEST_NGINX_PORT was set to port numbers other than 1985.
2013-05-14 17:14:05 -07:00
agentzh (Yichun Zhang)
603c7a4796
refactor: made the error messages for replacement template compilation failures less verbose in ngx.re.sub and ngx.re.gsub.
2013-05-13 18:09:08 -07:00
agentzh (Yichun Zhang)
bd679f20ef
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.
2013-05-08 21:37:51 -07:00
agentzh (Yichun Zhang)
f20bc66109
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.
2013-05-08 21:03:04 -07:00
agentzh (Yichun Zhang)
300b167bd4
fixed a test that may time out unexpectedly.
2013-05-08 18:27:09 -07:00
agentzh (Yichun Zhang)
5cd82926fc
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.
2013-05-08 17:32:15 -07:00
agentzh (Yichun Zhang)
9cfcb06ba8
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 .
2013-05-08 13:08:26 -07:00
agentzh (Yichun Zhang)
06da40f9b9
style: fixed one line's indentation.
2013-05-07 23:19:50 -07:00
agentzh (Yichun Zhang)
31a80431cc
fixed some expected error messages in the ngx.re test cases for Lua implementations of the ngx_lua API like lua-resty-core.
2013-05-07 18:55:04 -07:00
agentzh (Yichun Zhang)
9b8a7b5e03
change: made more error messages for regex exec failures less verbose.
2013-05-07 18:30:19 -07:00
agentzh (Yichun Zhang)
5c5a0a87ba
change: made the error messages for regex exec failures less verbose.
2013-05-07 18:25:19 -07:00
agentzh (Yichun Zhang)
35e6a65f9f
change: made the error messages for regex compilation failures less verbose.
2013-05-07 18:07:41 -07:00
agentzh (Yichun Zhang)
4806fc2eef
bugfix: fixed the warning "argument 'nret' might be clobbered by 'longjmp' or 'vfork'" when compiling with Ubuntu 13.04's gcc 4.7.3. thanks jacky and Rajeev's reports.
2013-05-07 16:03:03 -07:00
agentzh (Yichun Zhang)
41e3c2f5b9
docs: documented the new WebDAV request methods; also fixed a small typo.
2013-05-07 13:01:29 -07:00
agentzh (Yichun Zhang)
b4c2ad1f8e
feature: added ngx.HTTP_MKCOL, ngx.HTTP_COPY, ngx.HTTP_MOVE, and other WebDAV request method constants; also added corresponding support to ngx.req.set_method and ngx.location.capture. thanks Adallom Roy for the patch.
2013-05-07 12:36:20 -07:00
agentzh (Yichun Zhang)
601ddff378
optimize: ngx.escape_uri now runs faster when the input string contains no special chars to be escaped.
2013-05-03 16:30:35 -07:00
agentzh (Yichun Zhang)
b7b728926a
bugfix: temporary memory leaks might happen when using ngx.escape_uri, ngx.unescape_uri, ngx.quote_sql_str, ngx.decode_base64, and ngx.encode_base64 in tight Lua loops because we allocated memory in nginx's request memory pool for these methods.
2013-05-03 16:25:50 -07:00
agentzh (Yichun Zhang)
f442858bb9
minor coding style fixes and micro optimizations in ngx.md5, ngx.encode_base64, and ngx.decode_base64.
2013-05-03 16:18:16 -07:00
agentzh (Yichun Zhang)
1cc76f5978
feature: allow injecting new APIs into the "ngx" table.
2013-05-03 15:53:19 -07:00
agentzh (Yichun Zhang)
c04c51a232
bugfix: ngx.req.set_body_file() always enabled Direct I/O which caused the alert message "fcntl(O_DIRECT) ... Invalid argument" in error logs on file systems lacking the Direct I/O support. buffer corruption might happen in ngx.req.set_body_file() when nginx upstream modules are used later because ngx.req.set_body_file() incorrectly set r->request_body->buf to the in-file buffer which could get reused by ngx_http_upstream for its own purposes. thanks Matthieu Tourne for reporting this issue.
2013-05-03 15:49:14 -07:00
agentzh (Yichun Zhang)
34411875fb
added error log checks to the bytecode tests.
2013-04-27 12:48:16 -07:00
agentzh (Yichun Zhang)
e7dff1b301
updated the docs in plain text and markdown format to reflect recent changes.
2013-04-26 12:41:21 -07:00
agentzh (Yichun Zhang)
c558c4347b
bumped version to 0.8.1.
2013-04-26 12:27:52 -07:00
agentzh (Yichun Zhang)
04c81b1f84
minor coding style fixes.
2013-04-25 23:06:59 -07:00
agentzh (Yichun Zhang)
65ff8d86da
fixed a test case that may behave slighly differently on slow machines.
2013-04-25 22:56:53 -07:00
agentzh (Yichun Zhang)
790a74e043
bugfix: when lua_http10_buffering is on, for HTTP 1.0 requests, ngx.exit(N) would always trigger the nginx's own error pages when N >= 300. thanks Matthieu Tourne for reporting this issue.
2013-04-24 19:07:42 -07:00