зеркало из https://github.com/mozilla/pjs.git
Fix for bug 48200. We were incorrectly setting mDocumentURI to the OriginalURI which completely broke redirects (which are conveyed thru URI and not OriginalURI) r=hyatt
This commit is contained in:
Родитель
5e1ccf53ce
Коммит
2439125f20
|
@ -930,7 +930,17 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
|
|||
NS_IF_RELEASE(mNameSpaceManager);
|
||||
|
||||
if (aChannel) {
|
||||
(void)aChannel->GetOriginalURI(&mDocumentURL);
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
(void) aChannel->GetOriginalURI(getter_AddRefs(uri));
|
||||
nsXPIDLCString scheme;
|
||||
(void)uri->GetScheme(getter_Copies(scheme));
|
||||
if (scheme && ((0 == PL_strncmp((const char*)scheme, "chrome", 6)) ||
|
||||
(0 == PL_strncmp((const char*)scheme, "resource", 8))))
|
||||
(void)aChannel->GetOriginalURI(&mDocumentURL);
|
||||
else
|
||||
(void)aChannel->GetURI(&mDocumentURL);
|
||||
|
||||
nsCOMPtr<nsISupports> owner;
|
||||
aChannel->GetOwner(getter_AddRefs(owner));
|
||||
if (owner)
|
||||
|
|
|
@ -930,7 +930,17 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
|
|||
NS_IF_RELEASE(mNameSpaceManager);
|
||||
|
||||
if (aChannel) {
|
||||
(void)aChannel->GetOriginalURI(&mDocumentURL);
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
(void) aChannel->GetOriginalURI(getter_AddRefs(uri));
|
||||
nsXPIDLCString scheme;
|
||||
(void)uri->GetScheme(getter_Copies(scheme));
|
||||
if (scheme && ((0 == PL_strncmp((const char*)scheme, "chrome", 6)) ||
|
||||
(0 == PL_strncmp((const char*)scheme, "resource", 8))))
|
||||
(void)aChannel->GetOriginalURI(&mDocumentURL);
|
||||
else
|
||||
(void)aChannel->GetURI(&mDocumentURL);
|
||||
|
||||
nsCOMPtr<nsISupports> owner;
|
||||
aChannel->GetOwner(getter_AddRefs(owner));
|
||||
if (owner)
|
||||
|
|
Загрузка…
Ссылка в новой задаче