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

Keep-alive connections over http #3857

Closed
brian-mann opened this issue Apr 1, 2019 · 2 comments

Comments

2 participants
@brian-mann
Copy link
Member

commented Apr 1, 2019

Problem

HTTP requests through the proxy layer seem to be not taking advantage of HTTP keep-alive to re-use the same connection for multiple requests. Some requests were getting Connection: close instead of taking advantage of Connection: keep-alive, here's what I found when looking at the headers sent and received by Chrome:

  Connection in request Connection in response
HTTPS, intercepted keep-alive keep-alive
HTTPS, non-intercepted keep-alive keep-alive
HTTP, non-intercepted none (is keep-alive in Chrome) close (should be none)

I think that Chrome is omitting the Connection: keep-alive because it's connected to a proxy, and it expects the proxy to negotiate the Keep-Alive part of the connection. That would explain why HTTP has it and HTTPS does not (HTTPS is not interceptable).

Solution

When an HTTP request is received by the proxy layer, by default, send it with a Connection: keep-alive header so that the connection will be reused if possible.

Commit: 8839177

PR comment discussing before and after: #3531 (comment)

@flotwig flotwig referenced this issue Apr 1, 2019

Merged

Improved proxy support #3531

38 of 38 tasks complete
@brian-mann

This comment has been minimized.

Copy link
Member Author

commented Apr 1, 2019

Fixed by #3531

@brian-mann brian-mann closed this Apr 1, 2019

@cypress-bot

This comment has been minimized.

Copy link

commented May 17, 2019

Released in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.