-
Notifications
You must be signed in to change notification settings - Fork 2k
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
New features for ngx_lua #286
Conversation
…header that determines whether or not to replace underscores with hyphens. Previously, underscores were replaced unconditionally. Currently each of the functions has another boolean argument. If it's false, underscores would not be touched. If it's true, they would. The default value of the argument is true.
…ptions), in which the only possible option currently is replace_underscores.
…keepalive option for the request.
- Now receive and send operations can be done simultaneous from several threads. - A different timeout can be set for receive and send. - Added fake_close for the client socket (ngx.req.socket), so that a thread that receives on this socket can be notified that we don't want to read from it anymore.
…s to receive just like BSD's recv call, meaning the maximum number of bytes given. This will only work only when a number is given as the first parameter for receive. Note that this differs from the original LuaSocket API.
… the "Location" response header, Nginx won't try to make absolute in case it's relative. Default is on.
…response headers weren't set, ngx_lua won't enforce setting the content type header. Default is on, and this causes the default behavior - if the headers aren't set, then the 'Content-Type' header is set to the default content type.
ngx.thread.kill - kills a thread. ngx.thread.kill_sleeping - either kills immediately a sleeping thread, or, if the thread is not sleeping, can wait for it to end. Useful for a thread that has a loop in which it sleeps.
…eter as a string. If the method string isn't a known Nginx method, it is still passed (and Nginx considers it as unknown).
…to be performed in a streaming fashion.
Conflicts: src/ngx_http_lua_common.h src/ngx_http_lua_module.c
Conflicts: src/ngx_http_lua_common.h src/ngx_http_lua_module.c
…ts when using ngx.thread.kill_sleeping. Now removing the timer.
…(even when enforce_content_type is off).
…request body before using it. This makes it possible to implement 'streaming' protocols, in which both client and server can read and write at the same time (such as forward HTTPS proxy with the CONNECT method).
That's a lot of changes in a single pull request. Could you maybe separate and prioritize? Makes it easier to review the individual changes. |
… for controlling whether to send out a default Content-Type response header (as defined by the "default_type" directive). default on. thanks aviramc for the patch in #286.
@aviramc I've noticed that your "patches" branch cannot even build on my side with nginx 1.4.2:
Am I missing anything here? |
Regarding commits 789e36b and ebf9cc8 , it seems like a good patch. Thanks! Regarding the build errors - it is a problem in the subrequest streaming feature. It is turned off by default, by it seems that I forgot to put safe guards in some places. It will be fixed, and I'll post another pull request for the feature. |
I've added quite a few patches to ngx_lua, and recently I've merged it with the newest version.
Some of the changes relate to issues, and some to things that we've talked about.
Here's a summary of all the changes and the issues to which they relate:
I've tried to put each of the changes in a different branch in my fork of the repository, thus if you want to merge only specific features, you can merge a specific branch or cherry pick the relevant commits.
For more information about the streaming subrequest API, go to
https://groups.google.com/forum/?hl=en#!topic/openresty-en/2M6Z9BNtufQ