Bug 1809843 - Add a pref to force using HTTPS RR, r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D166643
This commit is contained in:
Kershaw Chang 2023-03-16 21:28:58 +00:00
Родитель f7db3ac56b
Коммит cd31baf9a1
2 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -12360,6 +12360,13 @@
value: false
mirror: always
# Whether to use HTTPS RR and ignore NS_HTTP_DISALLOW_HTTPS_RR
# This pref is only set when running tests
- name: network.dns.force_use_https_rr
type: RelaxedAtomicBool
value: false
mirror: always
- name: network.cache.frecency_array_check_enabled
type: RelaxedAtomicBool
value: @IS_EARLY_BETA_OR_EARLIER@

Просмотреть файл

@ -357,13 +357,15 @@ nsresult nsHttpTransaction::Init(
mPushedStream = trans->TakePushedStreamById(aPushedStreamId);
}
if (gHttpHandler->UseHTTPSRRAsAltSvcEnabled() &&
!(mCaps & NS_HTTP_DISALLOW_HTTPS_RR)) {
bool forceUseHTTPSRR = StaticPrefs::network_dns_force_use_https_rr();
if ((gHttpHandler->UseHTTPSRRAsAltSvcEnabled() &&
!(mCaps & NS_HTTP_DISALLOW_HTTPS_RR)) ||
forceUseHTTPSRR) {
nsCOMPtr<nsIEventTarget> target;
Unused << gHttpHandler->GetSocketThreadTarget(getter_AddRefs(target));
if (target) {
if (StaticPrefs::network_dns_force_waiting_https_rr() ||
StaticPrefs::network_dns_echconfig_enabled()) {
StaticPrefs::network_dns_echconfig_enabled() || forceUseHTTPSRR) {
mCaps |= NS_HTTP_FORCE_WAIT_HTTP_RR;
}