Bug 1411725 - have XHR responseURL use the final channel URL so the expected URLs for substituted protocols like web-extension: are returned; r=mayhemer

have XHR responseURL use the final channel URL so the expected URLs for substituted protocols like web-extension: are returned

Differential Revision: https://phabricator.services.mozilla.com/D23811
This commit is contained in:
Thomas Wisniewski
2019-03-21 23:43:52 +00:00
parent 1ff97a1a38
commit 146238fab9
3 changed files with 25 additions and 3 deletions

View File

@@ -781,9 +781,7 @@ void XMLHttpRequestMainThread::GetResponseURL(nsAString& aUrl) {
}
nsCOMPtr<nsIURI> responseUrl;
mChannel->GetURI(getter_AddRefs(responseUrl));
if (!responseUrl) {
if (NS_FAILED(NS_GetFinalChannelURI(mChannel, getter_AddRefs(responseUrl)))) {
return;
}