summaryrefslogtreecommitdiffstats
path: root/netwerk/base/nsIOService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/base/nsIOService.cpp')
-rw-r--r--netwerk/base/nsIOService.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp
index 8450a59b4a..998c389ace 100644
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -87,6 +87,7 @@ using mozilla::dom::ServiceWorkerDescriptor;
#define WEBRTC_PREF_PREFIX "media.peerconnection."
#define NETWORK_DNS_PREF "network.dns."
#define FORCE_EXTERNAL_PREF_PREFIX "network.protocol-handler.external."
+#define SIMPLE_URI_SCHEMES_PREF "network.url.simple_uri_schemes"
nsIOService* gIOService;
static bool gHasWarnedUploadChannel2;
@@ -171,6 +172,7 @@ int16_t gBadPortList[] = {
2049, // nfs
3659, // apple-sasl
4045, // lockd
+ 4160, // sieve
5060, // sip
5061, // sips
6000, // x11
@@ -180,6 +182,7 @@ int16_t gBadPortList[] = {
6667, // irc (default)
6668, // irc (alternate)
6669, // irc (alternate)
+ 6679, // osaut
6697, // irc+tls
10080, // amanda
0, // Sentinel value: This MUST be zero
@@ -211,6 +214,7 @@ static const char* gCallbackPrefs[] = {
NECKO_BUFFER_CACHE_SIZE_PREF,
NETWORK_CAPTIVE_PORTAL_PREF,
FORCE_EXTERNAL_PREF_PREFIX,
+ SIMPLE_URI_SCHEMES_PREF,
nullptr,
};
@@ -1528,6 +1532,15 @@ void nsIOService::PrefsChanged(const char* pref) {
AutoWriteLock lock(mLock);
mForceExternalSchemes = std::move(forceExternalSchemes);
}
+
+ if (!pref || strncmp(pref, SIMPLE_URI_SCHEMES_PREF,
+ strlen(SIMPLE_URI_SCHEMES_PREF)) == 0) {
+ LOG((
+ "simple_uri_schemes pref change observed, updating the scheme list\n"));
+ nsAutoCString schemeList;
+ Preferences::GetCString(SIMPLE_URI_SCHEMES_PREF, schemeList);
+ mozilla::net::ParseSimpleURISchemes(schemeList);
+ }
}
void nsIOService::ParsePortList(const char* pref, bool remove) {