Issue #2641 - Update Fetch to adhere to the updated spec (pass refpolicy)

Resolves #2641
This commit is contained in:
Moonchild 2024-10-20 11:23:30 +02:00 committed by roytam1
commit 7d978ccd71
16 changed files with 244 additions and 91 deletions

View file

@ -733,6 +733,8 @@ bool
HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
const RequestHeaderTuples& changedHeaders,
const uint32_t& loadFlags,
const uint32_t& referrerPolicy,
const OptionalURIParams& aReferrerURI,
const OptionalURIParams& aAPIRedirectURI,
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
const bool& aChooseAppcache)
@ -773,6 +775,9 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
newInternalChannel->SetCorsPreflightParameters(args.unsafeHeaders());
}
nsCOMPtr<nsIURI> referrerUri = DeserializeURI(aReferrerURI);
newHttpChannel->SetReferrerWithPolicy(referrerUri, referrerPolicy);
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
do_QueryInterface(newHttpChannel);
if (appCacheChannel) {