Brotli Support Patches 1-6 (bug 366559)

Preparations for Brotli Accept-Encoding/Content-Encoding. Tag #921
This commit is contained in:
Gpower2
2017-07-17 00:05:22 +03:00
committed by Roy Tam
parent b8cfa5c263
commit 13beed8fe6
5 changed files with 50 additions and 20 deletions
+6 -4
View File
@@ -132,9 +132,9 @@ HttpBaseChannel::Init(nsIURI *aURI,
// Construct connection info object
nsAutoCString host;
int32_t port = -1;
bool usingSSL = false;
bool isHTTPS = false;
nsresult rv = mURI->SchemeIs("https", &usingSSL);
nsresult rv = mURI->SchemeIs("https", &isHTTPS);
if (NS_FAILED(rv)) return rv;
rv = mURI->GetAsciiHost(host);
@@ -164,7 +164,7 @@ HttpBaseChannel::Init(nsIURI *aURI,
rv = mRequestHead.SetHeader(nsHttp::Host, hostLine);
if (NS_FAILED(rv)) return rv;
rv = gHttpHandler->AddStandardRequestHeaders(&mRequestHead.Headers());
rv = gHttpHandler->AddStandardRequestHeaders(&mRequestHead.Headers(), isHTTPS);
if (NS_FAILED(rv)) return rv;
nsAutoCString type;
@@ -678,7 +678,9 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener,
break;
}
if (gHttpHandler->IsAcceptableEncoding(val)) {
bool isHTTPS = false;
mURI->SchemeIs("https", &isHTTPS);
if (gHttpHandler->IsAcceptableEncoding(val, isHTTPS)) {
nsCOMPtr<nsIStreamConverterService> serv;
rv = gHttpHandler->GetStreamConverterService(getter_AddRefs(serv));