You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 ofConnection: keep-alive
, here's what I found when looking at the headers sent and received by Chrome:Connection
in requestConnection
in responsekeep-alive
keep-alive
keep-alive
keep-alive
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)
The text was updated successfully, but these errors were encountered: