mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 14:28:42 +00:00
Bug 1198394 - Part 1: Allow interception of HSTS upgraded connections in non-e10s mode; r=mcmanus
This commit is contained in:
parent
9f79fb702f
commit
0078aed98a
@ -2007,14 +2007,16 @@ nsHttpChannel::StartRedirectChannelToURI(nsIURI *upgradedURI, uint32_t flags)
|
||||
// Inform consumers about this fake redirect
|
||||
mRedirectChannel = newChannel;
|
||||
|
||||
// Ensure that internally-redirected channels cannot be intercepted, which would look
|
||||
// like two separate requests to the nsINetworkInterceptController.
|
||||
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
|
||||
rv = mRedirectChannel->GetLoadFlags(&loadFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
|
||||
rv = mRedirectChannel->SetLoadFlags(loadFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!(flags & nsIChannelEventSink::REDIRECT_STS_UPGRADE)) {
|
||||
// Ensure that internally-redirected channels cannot be intercepted, which would look
|
||||
// like two separate requests to the nsINetworkInterceptController.
|
||||
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
|
||||
rv = mRedirectChannel->GetLoadFlags(&loadFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
|
||||
rv = mRedirectChannel->SetLoadFlags(loadFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
PushRedirectAsyncFunc(
|
||||
&nsHttpChannel::ContinueAsyncRedirectChannelToURI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user