mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Bug 1523427 - Check whether we really have a response for a upgrade request before making a connection DontReuse. r=michal
Differential Revision: https://phabricator.services.mozilla.com/D18202 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1ad5d6e1f1
commit
4aa2cbebc3
@ -1289,6 +1289,7 @@ nsresult nsHttpConnection::OnHeadersAvailable(nsAHttpTransaction *trans,
|
||||
// it was successful. If so, we have to reset the transaction and step-up
|
||||
// the socket connection if using SSL. Finally, we have to wake up the
|
||||
// socket write request.
|
||||
bool itWasProxyConnect = !!mProxyConnectStream;
|
||||
if (mProxyConnectStream) {
|
||||
MOZ_ASSERT(mUsingSpdyVersion == SpdyVersion::NONE,
|
||||
"SPDY NPN Complete while using proxy connect stream");
|
||||
@ -1347,8 +1348,8 @@ nsresult nsHttpConnection::OnHeadersAvailable(nsAHttpTransaction *trans,
|
||||
// some proxies expect to see auth response on persistent connection.
|
||||
// Also allow persistent conn for h2, as we don't want to waste connections
|
||||
// for multiplexed upgrades.
|
||||
if (hasUpgradeReq && responseStatus != 401 && responseStatus != 407 &&
|
||||
!mSpdySession) {
|
||||
if (!itWasProxyConnect && hasUpgradeReq && responseStatus != 401 &&
|
||||
responseStatus != 407 && !mSpdySession) {
|
||||
LOG(("HTTP Upgrade in play - disable keepalive for http/1.x\n"));
|
||||
DontReuse();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user