-
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
Added an API to set the keepalive property of the request #287
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.
(cherry picked from commit e9e1dec)
Will open an updated pull request |
What's the status of this patch? Did it ever got merged? |
@majek It's replaced by another pull request. I meant to merge this feature soon. |
I know it it's been a while now, but can you point out which other PR supersedes this one? I can't find a clean way to force a connection close for a particular request with the current API. |
I wonder if we could just achieve the same result by using @dndx What's your take on this please? |
Using
Maybe a better way to implement that feature would be to use the |
@jdesgats OK, this is because nginx tests From your examples above, it seems like |
@agentzh Somehow I missed this last week but I agree that setting Also, we should check and make sure See http://lxr.nginx.org/source/src/http/ngx_http_request.c#2602 for the full conditions. |
@jdesgats Yeah adding a special handler for the "Connection" header is probably a better way of achieving it without introducing new APIs. I don't even think the fact that currently we have no special set handler for "Connection" makes sense since AFAIK inside |
@agentzh no, it doesn't really work as the client get 2 I'll try to find some time to make a PR using a special handler :) |
Setting the keepalive from Lua is useful when implementing all kinds of protocols above ngx_lua.
Some protocols may require that the connection would be closed or stay open.
The is a part of pull request #286