зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1809518 - Special case the HTTPS Only timeout request to make it bypass ORB r=farre,necko-reviewers
This particular request is used to identify the potential timeout issue for HTTPS only requests. ORB doesn't need to block this request. Differential Revision: https://phabricator.services.mozilla.com/D170251
This commit is contained in:
Родитель
84f1835811
Коммит
27084394a5
|
@ -1033,7 +1033,8 @@ TestHTTPAnswerRunnable::Notify(nsITimer* aTimer) {
|
|||
nsCOMPtr<nsILoadInfo> loadInfo = testHTTPChannel->LoadInfo();
|
||||
uint32_t httpsOnlyStatus = loadInfo->GetHttpsOnlyStatus();
|
||||
httpsOnlyStatus |= nsILoadInfo::HTTPS_ONLY_EXEMPT |
|
||||
nsILoadInfo::HTTPS_ONLY_DO_NOT_LOG_TO_CONSOLE;
|
||||
nsILoadInfo::HTTPS_ONLY_DO_NOT_LOG_TO_CONSOLE |
|
||||
nsILoadInfo::HTTPS_ONLY_BYPASS_ORB;
|
||||
loadInfo->SetHttpsOnlyStatus(httpsOnlyStatus);
|
||||
|
||||
testHTTPChannel->SetNotificationCallbacks(this);
|
||||
|
|
|
@ -500,6 +500,11 @@ interface nsILoadInfo : nsISupports
|
|||
*/
|
||||
const unsigned long HTTPS_ONLY_UPGRADED_HTTPS_FIRST = (1 << 7);
|
||||
|
||||
/**
|
||||
* This flag indicates that the request should not be blocked by ORB.
|
||||
*/
|
||||
const unsigned long HTTPS_ONLY_BYPASS_ORB = (1 << 8);
|
||||
|
||||
/**
|
||||
* Upgrade state of HTTPS-Only Mode. The flag HTTPS_ONLY_EXEMPT can get
|
||||
* set on requests that should be excempt from an upgrade.
|
||||
|
|
|
@ -335,4 +335,7 @@ interface nsIRequest : nsISupports
|
|||
* effect.
|
||||
*/
|
||||
const unsigned long LOAD_FRESH_CONNECTION = 1 << 15;
|
||||
|
||||
// Note that all flags are taken, the rest of the flags
|
||||
// are located in nsIChannel and nsICachingChannel
|
||||
};
|
||||
|
|
|
@ -3086,6 +3086,12 @@ bool HttpBaseChannel::ShouldBlockOpaqueResponse() const {
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t httpsOnlyStatus = mLoadInfo->GetHttpsOnlyStatus();
|
||||
if (httpsOnlyStatus & nsILoadInfo::HTTPS_ONLY_BYPASS_ORB) {
|
||||
LOGORB("No block: HTTPS_ONLY_BYPASS_ORB");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isInDevToolsContext;
|
||||
mLoadInfo->GetIsInDevToolsContext(&isInDevToolsContext);
|
||||
if (isInDevToolsContext) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче