Bug 1242472 - Properly propagate mTopWindowURI through redirects. r=francois/ckerschb

This commit is contained in:
Blake Kaplan 2016-02-02 13:44:11 -08:00
parent 9fcf502519
commit 443753e20a

View File

@ -2732,6 +2732,12 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
httpInternal->SetAllowSpdy(mAllowSpdy);
httpInternal->SetAllowAltSvc(mAllowAltSvc);
RefPtr<nsHttpChannel> realChannel;
CallQueryInterface(newChannel, realChannel.StartAssignment());
if (realChannel) {
realChannel->SetTopWindowURI(mTopWindowURI);
}
// update the DocumentURI indicator since we are being redirected.
// if this was a top-level document channel, then the new channel
// should have its mDocumentURI point to newURI; otherwise, we