Bug 1214305 - Part 4: Use the secure upgraded channel URI in ServiceWorkerManager::PrepareFetchEvent; r=jdm

This is needed to ensure that the ServiceWorkerManager uses the
correct URI for non-subresource requests.  Note that we're relying
on the property that non-secure non-subresource requests can never
be intercepted, so we don't need to check the request type explicitly.
This commit is contained in:
Ehsan Akhgari 2015-11-02 11:27:00 -05:00
parent 12615bef93
commit 5d88f104b5

View File

@ -3591,7 +3591,7 @@ ServiceWorkerManager::PrepareFetchEvent(const PrincipalOriginAttributes& aOrigin
documentId = aDocumentIdForTopLevelNavigation;
nsCOMPtr<nsIURI> uri;
aRv = internalChannel->GetURI(getter_AddRefs(uri));
aRv = aChannel->GetSecureUpgradedChannelURI(getter_AddRefs(uri));
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}