summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/AlternateServices.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-07 12:45:54 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-07 12:45:54 +0100
commitd38ddd92e159113aae22c4dc8f03dc2285e01b14 (patch)
treee7b7b0f0604856a7fb9fed588dd2ba8be7da61b9 /netwerk/protocol/http/AlternateServices.cpp
parent7e0d3b80f114a1905003804c35cd863d634ecdbb (diff)
downloadUXP-d38ddd92e159113aae22c4dc8f03dc2285e01b14.tar
UXP-d38ddd92e159113aae22c4dc8f03dc2285e01b14.tar.gz
UXP-d38ddd92e159113aae22c4dc8f03dc2285e01b14.tar.lz
UXP-d38ddd92e159113aae22c4dc8f03dc2285e01b14.tar.xz
UXP-d38ddd92e159113aae22c4dc8f03dc2285e01b14.zip
Part 1: network component changes.
Diffstat (limited to 'netwerk/protocol/http/AlternateServices.cpp')
-rw-r--r--netwerk/protocol/http/AlternateServices.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/netwerk/protocol/http/AlternateServices.cpp b/netwerk/protocol/http/AlternateServices.cpp
index b3e6babe3..ee2fa9331 100644
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -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)) ||