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
Closed

Keep-alive connections over http #3857

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

Comments

@brian-mann
Copy link
Member

@brian-mann brian-mann 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)

@brian-mann
Copy link
Member Author

@brian-mann brian-mann commented Apr 1, 2019

Fixed by #3531

@brian-mann brian-mann closed this Apr 1, 2019
@cypress-bot
Copy link

@cypress-bot cypress-bot bot 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants