Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate ngx_http_lua v0.10.15 and added ports to ngx_stream_lua #71

Merged

Conversation

thibaultcha
Copy link
Member

@thibaultcha thibaultcha commented Jul 31, 2019

This PR's goal is to make ngx_meta_lua catch up with the latest changes in ngx_http_lua.

See #70 for a list of remaining commits from ngx_http_lua to port to this module.

Replaces #64, #65, and #66.

Details

After this PR, this module generates:

Additionally, this PR contains the .tt2 templates for the ngx.pipe API to be ported to ngx_stream_lua (tested locally and successfully compiling). However, the ngx.pipe API is not yet enabled in the ngx_stream_lua module as of this PR given the large amount of work expected in porting the tests.

TODO

The following test cases must be ported to ngx_stream_lua:

Sister PRs

…tp_lua module.

For the time being, this API is not tested nor documented in for the
ngx_http_lua module.
…socket_udp_send()'.

This aligns with the current code in the ngx_http_lua module, which has
a test relying on the debug output of `ngx_send()` (and not that of
`ngx_udp_send()`).

However, ngx_stream_lua requires the use of `ngx_udp_send()` which uses
`sendto()`.
…em directory.

This is useful when a given file has been converted to a .tt2 template,
but not ready to be ported to another subsystem yet.

E.g. the ngx.pipe API is now ported to a template (and compiles with the
ngx_stream_lua module), but tests are not ported yet. In order to not
revert the template, we make it part of the http subsystem only until
tests are ported to the ngx_stream_lua module.
feature: ngx.req.get_post_args(), ngx.req.get_uri_args(), ngx.req.get_headers(), ngx.resp.get_headers(), and ngx.decode_args() now would return an error string, "truncated", when the input exceeds the max_args/max_headers limits.

bugfix: ngx.resp.get_headers(): the max_headers limit did not cover builtin headers.
change: we now avoid generating the Content-Type response header when getting all response headers. #fbb8919
bugfix: ensured Content-Type header gets generated when other headers get set. #cec2a09
bugfix: we now avoid generating a Content-Type header when getting/setting other response headers. #017e004
typo: fixed a debug log in access and rewrite handlers.
bugfix: when variable is cacheable and indexed, setting the request
"Host" header should clear any existing cached $host variable value so
that subsequent reads return the expected result.

Thanks Datong Sun for the upstream patch.
feature: api.h: exposed the ngx_http_lua_ffi_str_t type for other Nginx
C modules.

Thanks spacewander for the upstream patch.
bugfix: fixed segfault in NGINX core >= 1.15.0 when init_worker_by_lua*
is used.

Thanks Datong Sun for the upstream patch.
feature: added support for the Nginx builtin Link header.

This allows for specifying multiple values in the Link header.

Thanks bjoe2k4 and tokers for the upstream patch.
bugfix: ngx_http_lua_ffi_ssl_set_serialized_session(): avoided memory
leak when calling it repeatly.

Thanks spacewander for the upstream patch.
bugfix: inlined Lua code snippets in nginx.conf failed to use the Lua
source checksum as part of the Lua code cache key. Thanks Oleg A. Mamo
ntov for the report in openresty/lua-nginx-module#1428.

Upstream patch from agentzh.
feature: allowed sending boolean and nil values in cosockets.

Thanks spacewander for the upstream patch.
bugfix: ngx.process: process.type() didn't return 'master' in master
process.

Thanks spacewander for the upstream patch.
bugfix: tcpsock:setkeepalive: worker processes might take too long to
gracefully shut down when the keep alive connections take a long max
idle time.

Now we avoid putting any new connections into the pool when nginx is
already shutting down.

Thanks Dejiang Zhu for the upstream patch.
feature: errors are now logged when timers fail to run.

Thanks Zexuan Luo for the upstream patch.
feature: added backlog queueing to cosocket connection pools.

Now we can pass 'pool_size' and 'backlog' options in connect method to
specify the pool size and the queue size of the connection pool.

When there is more connect operations than the pool_size, new connect
operation will be queued until former connect operation fails or
connection finalizes.

When there is more queueing connect operations than the backlog, new
connect operation will be dropped.

This pr also migrated connection pool creation to connect method.  Note
that the meaning of `active_connections` is changed from the previous
setkeepalive mechanism. The connection pool is destroyed only if all
related connections closed now.

---

bugfix: only update connections count when cosockets are truly
associated with the socket pool.

---

bugfix: ensured we cleanup up aborted queued connect operations.

---

Thanks Zexuan Luo for the upstream patches.
…#f87d1f1.

feature: added the C API to support the 'ngx.pipe' module provided by
lua-resty-core.

---

bugfix: ngx.pipe: proc:wait() returns false only when the sub-process
exited abnormally.

---

bugfix: ngx.pipe: fixed a segfault when error_log is configured with
syslog.

---

bugfix: ngx.pipe: cleared the pending event after aborting the uthread.

---

Thanks Zexuan Luo for the upstream patches.
feature: added the FFI API for 'str_replace_char()'.
@thibaultcha thibaultcha force-pushed the ngx-lua-v0.10.15-and-stream-ports branch from cc7e764 to 3018ec8 Compare August 26, 2019 21:50
@thibaultcha thibaultcha force-pushed the ngx-lua-v0.10.15-and-stream-ports branch from b028156 to dcedde8 Compare August 27, 2019 21:42
@thibaultcha thibaultcha merged commit e431196 into openresty:master Aug 27, 2019
@thibaultcha thibaultcha deleted the ngx-lua-v0.10.15-and-stream-ports branch August 27, 2019 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant