mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-16 19:48:18 +00:00
bug 1056133 - add h2 to coalescing list r=hurley
This commit is contained in:
parent
afff23ff06
commit
8bb10930d4
@ -805,21 +805,19 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (gHttpHandler->SpdyInfo()->ProtocolEnabled(0))
|
||||
rv = sslSocketControl->JoinConnection(gHttpHandler->SpdyInfo()->VersionString[0],
|
||||
aOriginalEntry->mConnInfo->GetHost(),
|
||||
aOriginalEntry->mConnInfo->Port(),
|
||||
&isJoined);
|
||||
else
|
||||
rv = NS_OK; /* simulate failed join */
|
||||
|
||||
// JoinConnection() may have failed due to spdy version level. Try the other
|
||||
// level we support (if any)
|
||||
if (NS_SUCCEEDED(rv) && !isJoined && gHttpHandler->SpdyInfo()->ProtocolEnabled(1)) {
|
||||
rv = sslSocketControl->JoinConnection(gHttpHandler->SpdyInfo()->VersionString[1],
|
||||
aOriginalEntry->mConnInfo->GetHost(),
|
||||
aOriginalEntry->mConnInfo->Port(),
|
||||
&isJoined);
|
||||
// try all the spdy versions we support.
|
||||
const SpdyInformation *info = gHttpHandler->SpdyInfo();
|
||||
for (uint32_t index = SpdyInformation::kCount;
|
||||
NS_SUCCEEDED(rv) && index > 0; --index) {
|
||||
if (info->ProtocolEnabled(index - 1)) {
|
||||
rv = sslSocketControl->JoinConnection(info->VersionString[index - 1],
|
||||
aOriginalEntry->mConnInfo->GetHost(),
|
||||
aOriginalEntry->mConnInfo->Port(),
|
||||
&isJoined);
|
||||
if (NS_SUCCEEDED(rv) && isJoined) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv) || !isJoined) {
|
||||
|
Loading…
Reference in New Issue
Block a user