Part 1: network component changes.

This commit is contained in:
wolfbeast 2019-03-07 12:45:54 +01:00 • committed by Roy Tam
commit c8412ad501
8 changed files with 104 additions and 20 deletions

View file

@ -654,8 +654,13 @@ private:
{
nsID channelId;
nsLoadFlags flags;
nsContentPolicyType contentPolicyType =
loadInfo ? loadInfo->GetExternalContentPolicyType()
: nsIContentPolicy::TYPE_OTHER;
if (NS_FAILED(gHttpHandler->NewChannelId(&channelId)) ||
NS_FAILED(chan->Init(uri, caps, nullptr, 0, nullptr, channelId)) ||
NS_FAILED(chan->Init(uri, caps, nullptr, 0, nullptr, channelId, contentPolicyType)) ||
NS_FAILED(chan->SetAllowAltSvc(false)) ||
NS_FAILED(chan->SetRedirectMode(nsIHttpChannelInternal::REDIRECT_MODE_ERROR)) ||
NS_FAILED(chan->SetLoadInfo(loadInfo)) ||