-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
End proxied responses for 1xx, 204, 304 with no body, fix bug where cy server could be proxied #4358
Conversation
fix stopping debugproxy where it hasn't been started
@flotwig can you leave your comments here regarding the pairing with did and the followup work involved with understanding why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this but more investigation needs to be done as to why keepAlive: true
is causing the 5 second delay (likely due to server.keepAliveTimeout
being set to 5000ms
by default)
We noticed there was an exact 5 second delay while loading the 304. We don't have any 5 second timeouts in our codebase, but 5 seconds is the default Node Initially, we thought this came from either the https-proxy server or the server server or the e2e test server, so we set those servers' keepAliveTimeouts to numbers like 2500 or 7500 to try and see if it had an effect. It didn't. Turning |
Fixes #4298
Fixes #4410
https://tools.ietf.org/html/rfc7230#section-3.3.3
This PR short-circuits the proxy's response in these cases to just end the response. This prevents the kind of lagging behavior seen in #4298.
This PR also fixes a bug where the server's websocket port could be proxied if
NO_PROXY == ''
.