mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779100 - HSTS redirect load group management fix, r=jduell
This commit is contained in:
parent
020743deb1
commit
bd83f933cf
@ -1596,7 +1596,8 @@ nsHttpChannel::AsyncRedirectChannelToHttps()
|
||||
nsresult
|
||||
nsHttpChannel::ContinueAsyncRedirectChannelToHttps(nsresult rv)
|
||||
{
|
||||
AutoRedirectVetoNotifier notifier(this);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = OpenRedirectChannel(rv);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
// Fill the failure status here, the update to https had been vetoed
|
||||
@ -1613,9 +1614,16 @@ nsHttpChannel::ContinueAsyncRedirectChannelToHttps(nsresult rv)
|
||||
// that would call our OnStart/StopRequest after resume from waiting for
|
||||
// the redirect callback.
|
||||
DoNotifyListener();
|
||||
return rv;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHttpChannel::OpenRedirectChannel(nsresult rv)
|
||||
{
|
||||
AutoRedirectVetoNotifier notifier(this);
|
||||
|
||||
// Make sure to do this _after_ calling OnChannelRedirect
|
||||
mRedirectChannel->SetOriginalURI(mOriginalURI);
|
||||
|
||||
@ -1627,8 +1635,6 @@ nsHttpChannel::ContinueAsyncRedirectChannelToHttps(nsresult rv)
|
||||
// versions.
|
||||
rv = httpEventSink->OnRedirect(this, mRedirectChannel);
|
||||
if (NS_FAILED(rv)) {
|
||||
mStatus = rv;
|
||||
DoNotifyListener();
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
@ -1636,8 +1642,6 @@ nsHttpChannel::ContinueAsyncRedirectChannelToHttps(nsresult rv)
|
||||
// open new channel
|
||||
rv = mRedirectChannel->AsyncOpen(mListener, mListenerContext);
|
||||
if (NS_FAILED(rv)) {
|
||||
mStatus = rv;
|
||||
DoNotifyListener();
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -1653,7 +1657,7 @@ nsHttpChannel::ContinueAsyncRedirectChannelToHttps(nsresult rv)
|
||||
mCallbacks = nullptr;
|
||||
mProgressSink = nullptr;
|
||||
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -240,6 +240,7 @@ private:
|
||||
void HandleAsyncRedirectChannelToHttps();
|
||||
nsresult AsyncRedirectChannelToHttps();
|
||||
nsresult ContinueAsyncRedirectChannelToHttps(nsresult rv);
|
||||
nsresult OpenRedirectChannel(nsresult rv);
|
||||
|
||||
/**
|
||||
* A function that takes care of reading STS headers and enforcing STS
|
||||
|
Loading…
Reference in New Issue
Block a user