Bug 1305592 - Make the WellKnownChecker to use correct originAttributes. r=mcmanus, a=gchang
authorTim Huang <tihuang@mozilla.com>
Thu, 27 Oct 2016 11:22:40 +0800
changeset 437364 d6580e1fcc08a9e1ce7cd1f07a2fdb99f8a087f1
parent 437363 825c2ee219dcb28bd07727c2cdec08c749ce045d
child 437365 7424d61ee7f3f7456228f95cdec45c785def7de8
push id35389
push userfelipc@gmail.com
push dateThu, 10 Nov 2016 19:57:46 +0000
reviewersmcmanus, gchang
bugs1305592
milestone51.0a2
Bug 1305592 - Make the WellKnownChecker to use correct originAttributes. r=mcmanus, a=gchang
netwerk/protocol/http/AlternateServices.cpp
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -537,16 +537,17 @@ public:
 
   nsresult Start()
   {
     LOG(("WellKnownChecker::Start %p\n", this));
     nsCOMPtr<nsILoadInfo> loadInfo = new LoadInfo(nsContentUtils::GetSystemPrincipal(),
                                                   nullptr, nullptr,
                                                   nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                                                   nsIContentPolicy::TYPE_OTHER);
+    loadInfo->SetOriginAttributes(mCI->GetOriginAttributes());
 
     RefPtr<nsHttpChannel> chan = new nsHttpChannel();
     nsresult rv;
 
     mTransactionAlternate = new TransactionObserver(chan, this);
     RefPtr<nsHttpConnectionInfo> newCI = mCI->Clone();
     rv = MakeChannel(chan, mTransactionAlternate, newCI, mURI, mCaps, loadInfo);
     if (NS_FAILED(rv)) {