[http] Use a copy of nsHttpConnectionInfo.

The root cause in this bug is that the connection info used by
'SpdyConnectTransaction' is the same instance as the connection info in
'nsHttpTransaction', so we should clone it and let 'SpdyConnectTransaction' use
the cloned one.
This commit is contained in:
Moonchild 2020-11-19 18:19:29 +00:00 committed by roytam1
commit 63a7c7f90e
2 changed files with 8 additions and 7 deletions

View file

@ -2030,9 +2030,9 @@ nsHttpTransaction::DisableSpdy()
{
mCaps |= NS_HTTP_DISALLOW_SPDY;
if (mConnInfo) {
// This is our clone of the connection info, not the persistent one that
// is owned by the connection manager, so we're safe to change this here
mConnInfo->SetNoSpdy(true);
RefPtr<nsHttpConnectionInfo> connInfo = mConnInfo->Clone();
connInfo->SetNoSpdy(true);
mConnInfo.swap(connInfo);
}
}