summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/AlternateServices.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2019-03-12 18:29:14 +0100
committerGitHub <noreply@github.com>2019-03-12 18:29:14 +0100
commit709bc24e9110eba12f94cfcb8db00a8338ac4098 (patch)
tree8218d4f60d9eccacbf42df8cb88094a082d401b4 /netwerk/protocol/http/AlternateServices.cpp
parent6b4d81521f0c7bef48a1e8c3e9254a81df27a9d2 (diff)
parent367d77ee9a6df15cacaf1a1f4032f834e972b335 (diff)
downloadUXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar
UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.gz
UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.lz
UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.tar.xz
UXP-709bc24e9110eba12f94cfcb8db00a8338ac4098.zip
Merge pull request #995 from MoonchildProductions/httpaccept-work
Change the way http Accept: headers are used.
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)) ||