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

HTTP keep-alive header support #272

Closed
ronag opened this issue Jul 29, 2020 · 9 comments
Closed

HTTP keep-alive header support #272

ronag opened this issue Jul 29, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@ronag
Copy link
Member

ronag commented Jul 29, 2020

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive

@ronag ronag added the enhancement New feature or request label Jul 29, 2020
@ronag
Copy link
Member Author

ronag commented Jul 29, 2020

Not sure how useful this is in practice.

@delvedor
Copy link
Member

Isn't this library already keeping sockets alive?

@ronag
Copy link
Member Author

ronag commented Jul 30, 2020

Yes, this header is fo providing hints

@ronag
Copy link
Member Author

ronag commented Jul 30, 2020

@szmarczak Any ideas of when this is useful? Or someone that might know?

The only case I can think of is #273

@ronag
Copy link
Member Author

ronag commented Jul 30, 2020

I guess the server could indicate max pipelining maybe?

@ronag
Copy link
Member Author

ronag commented Jul 30, 2020

I have no idea. I might be interested in implementing it for Node core.

From looking at nginx docs, it seems an header that is send from the server to the client.

From http://nginx.org/en/docs/http/ngx_http_core_module.html

The first parameter sets a timeout during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections. The optional second parameter sets a value in the “Keep-Alive: timeout=time” response header field. Two parameters may differ.

The “Keep-Alive: timeout=time” header field is recognized by Mozilla and Konqueror. MSIE closes keep-alive connections by itself in about 60 seconds.

Originally posted by @mcollina in #273 (comment)

@szmarczak
Copy link
Member

Not sure how useful this is in practice.

Me neither...

@ronag
Copy link
Member Author

ronag commented Jul 30, 2020

I think we fixed the relevant parts of this in #275

@ronag ronag closed this as completed Jul 30, 2020
@ronag ronag reopened this Jul 30, 2020
@ronag ronag closed this as completed Jul 30, 2020
@BlueClouDragon
Copy link

how to set keep-alive connection in headers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants