Bug 1706604 - Part 2: Strip the URI before create the channel in nsDocShell. r=smaug
The target query parameters will be stripped from the loading URI in nsDocShell before creating the channel for the loading. We will only strip the URI for top-level loading but not for frames. It's because there is no need to strip frames if we've stripped in top-level already. Differential Revision: https://phabricator.services.mozilla.com/D113843
This commit is contained in:
@@ -10447,6 +10447,9 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
|
||||
nsLoadFlags loadFlags = aLoadState->CalculateChannelLoadFlags(
|
||||
mBrowsingContext, Some(uriModified), Some(isXFOError));
|
||||
|
||||
// Strip the target query parameters before creating the channel.
|
||||
aLoadState->MaybeStripTrackerQueryStrings(mBrowsingContext);
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
if (DocumentChannel::CanUseDocumentChannel(aLoadState->URI())) {
|
||||
channel = DocumentChannel::CreateForDocument(aLoadState, loadInfo,
|
||||
|
||||
Reference in New Issue
Block a user