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

Make --http-keepalive require an argument. #1637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

funkybob
Copy link
Contributor

This flag accepts a timeout value, but is typically mistaken for a bool.
Update the description to help clarify, and require the option value.

This flag accepts a timeout value, but is typically mistaken for a bool.
Update the description to help clarify, and require the option value.
@xrmx
Copy link
Collaborator

xrmx commented Sep 20, 2017

Uhm it looks like there's places where it is used as boolean because uwsgi_opt_set_int will set it a 1 if not value is passed.

plugins/http/http.c:                        if (uhttp.keepalive && !uwsgi_strncmp("HTTP/1.1", 8, base, ptr-base)) {
plugins/http/http.c:                    if (uhttp.keepalive && !uwsgi_strncmp("HTTP/1.1", 8, base, ptr-base)) {
plugins/http/http.c:                    if (uhttp.keepalive > 1) {
plugins/http/http.c:                            http_set_timeout(peer->session->main_peer, uhttp.keepalive);

@funkybob
Copy link
Contributor Author

So perhaps I should drop this, and just work on improving the docs?

BTW - what unit is that timeout in? I assumed seconds, but, well...

@karmux
Copy link

karmux commented Apr 26, 2018

Merge?
Boolean checks should work as expected after this change.
In another PR they can be changed to if (uhttp.keepalive > 0).
Related to #1245.

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.

3 participants