mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
Brotli Support Patches 1-6 (bug 366559)
Preparations for Brotli Accept-Encoding/Content-Encoding. Tag #921
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user