Bug 1253582 - h2 coalescing impacts wss:// r=michal, a=ritu

This commit is contained in:
Patrick McManus 2016-03-15 11:54:12 -04:00
parent 314de85e86
commit d3292d62a6
2 changed files with 8 additions and 4 deletions

View File

@ -339,6 +339,10 @@ nsHttpChannel::Connect()
if (!net_IsValidHostName(nsDependentCString(mConnectionInfo->Origin())))
return NS_ERROR_UNKNOWN_HOST;
if (mUpgradeProtocolCallback) {
mCaps |= NS_HTTP_DISALLOW_SPDY;
}
// Finalize ConnectionInfo flags before SpeculativeConnect
mConnectionInfo->SetAnonymous((mLoadFlags & LOAD_ANONYMOUS) != 0);
mConnectionInfo->SetPrivate(mPrivateBrowsing);
@ -859,7 +863,6 @@ nsHttpChannel::SetupTransaction()
mCaps |= NS_HTTP_STICKY_CONNECTION;
mCaps &= ~NS_HTTP_ALLOW_PIPELINING;
mCaps &= ~NS_HTTP_ALLOW_KEEPALIVE;
mCaps |= NS_HTTP_DISALLOW_SPDY;
}
if (mPushedStream) {

View File

@ -735,6 +735,7 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
{
if (!gHttpHandler->IsSpdyEnabled() ||
!gHttpHandler->CoalesceSpdy() ||
aOriginalEntry->mConnInfo->GetNoSpdy() ||
aOriginalEntry->mCoalescingKeys.IsEmpty()) {
return nullptr;
}
@ -768,7 +769,7 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
// remove the preferred status of this entry if it cannot be
// used for pooling.
RemovePreferredHash(preferred);
LOG(("nsHttpConnectionMgr::GetSpdyPreferredConnection "
LOG(("nsHttpConnectionMgr::GetSpdyPreferredEnt "
"preferred host mapping %s to %s removed due to inactivity.\n",
aOriginalEntry->mConnInfo->Origin(),
preferred->mConnInfo->Origin()));
@ -812,7 +813,7 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
}
if (NS_FAILED(rv) || !isJoined) {
LOG(("nsHttpConnectionMgr::GetSpdyPreferredConnection "
LOG(("nsHttpConnectionMgr::GetSpdyPreferredEnt "
"Host %s cannot be confirmed to be joined "
"with %s connections. rv=%x isJoined=%d",
preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(),
@ -822,7 +823,7 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
}
// IP pooling confirmed
LOG(("nsHttpConnectionMgr::GetSpdyPreferredConnection "
LOG(("nsHttpConnectionMgr::GetSpdyPreferredEnt "
"Host %s has cert valid for %s connections, "
"so %s will be coalesced with %s",
preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(),