зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1556489 - P13. Use LoadInfo redirect chain to determine when a channel has redirected and we should skip uri fixup. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40970
This commit is contained in:
Родитель
747652aa04
Коммит
aa250bb0c7
|
@ -6732,11 +6732,10 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doCreateAlternate) {
|
if (doCreateAlternate) {
|
||||||
|
nsCOMPtr<nsILoadInfo> info = aChannel->LoadInfo();
|
||||||
// Skip doing this if our channel was redirected, because we
|
// Skip doing this if our channel was redirected, because we
|
||||||
// shouldn't be guessing things about the post-redirect URI.
|
// shouldn't be guessing things about the post-redirect URI.
|
||||||
nsLoadFlags loadFlags = 0;
|
if (!info->RedirectChain().IsEmpty()) {
|
||||||
if (NS_FAILED(aChannel->GetLoadFlags(&loadFlags)) ||
|
|
||||||
(loadFlags & nsIChannel::LOAD_REPLACE)) {
|
|
||||||
doCreateAlternate = false;
|
doCreateAlternate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче