Bug 1153924 - do not use altsvc with proxy r=hurley

This commit is contained in:
Patrick McManus 2015-04-13 12:33:10 -04:00
parent 50eedfa31c
commit 669f68c699
2 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,11 @@ AltSvcMapping::ProcessHeader(const nsCString &buf, const nsCString &originScheme
return;
}
if (proxyInfo && !proxyInfo->IsDirect()) {
LOG(("AltSvcMapping::ProcessHeader ignoring due to proxy\n"));
return;
}
bool isHTTPS;
if (NS_FAILED(SchemeIsHTTPS(originScheme, isHTTPS))) {
return;

View File

@ -4826,6 +4826,7 @@ nsHttpChannel::BeginConnect()
nsRefPtr<AltSvcMapping> mapping;
if ((scheme.Equals(NS_LITERAL_CSTRING("http")) ||
scheme.Equals(NS_LITERAL_CSTRING("https"))) &&
(!proxyInfo || proxyInfo->IsDirect()) &&
(mapping = gHttpHandler->GetAltServiceMapping(scheme,
host, port,
mPrivateBrowsing))) {