-
-
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
Persistent HTTP connections #513
Comments
The basic idea here is that instead of closing the TCP connection after an HTTP request when content-length bytes have been read, leave it open for some period of time and if any new bytes are read, treat them as additional HTTP requests? |
Yeah, the basic idea is to not close the socket after handling a single HTTP request, but go back into the read to wait for the next request. I have version that does that and seems to work, but is vulnerable to a slowloris type of attack. I will create a pull request with this soon and hope to get some input as to enhancements or changes I could make. Regarding the slowloris, I'm currently thinking of enhancing this to prevent those types of attacks. |
The non-blocking HTTP handler (#425) introduced in 0.6.0 simplifies the implementation of HTTP handlers for most use cases. One part that websocketpp is missing though is support for HTTP/1.1 persistent connections, which enable a client to send multiple requests over the same socket. This is especially useful with TLS enabled as the TLS handshakes and TCP connection times can lead to a less-than ideal experience in the real world.
The text was updated successfully, but these errors were encountered: