We want dweb URLs to continue working as before bug 1536744 landed.
So we make sure to instantiate it as an nsStandardURL.
This is not a good long-term solution, as we don't want to hardcode
all the various schemes that we want to behave properly.
The fix would be to add a new spec-compliant nsIURI implementation,
based on RustURL and use it for all unknown schemes.
See bug 1561860 for a more complete solution.
Differential Revision: https://phabricator.services.mozilla.com/D36168
--HG--
extra : moz-landing-system : lando
Since the RESOLVE_JAR_URI flag is not used for moz-extension, ResolveJARURI
would never get called in ExtensionProtocolHandler, so it's OK to consider
it threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D33253
--HG--
extra : moz-landing-system : lando
The only protocol that can't be created off the main thread at the moment is
moz-extension, and that can be handled at a later time.
Differential Revision: https://phabricator.services.mozilla.com/D30713
--HG--
extra : moz-landing-system : lando
This is needed to pass a web-platform-test. Since unknown protocols use
nsSimpleURI and nsSimpleURI::GetHost returns an error code, that will fail.
Instead, we instantiate an nsStandardURL for the ssh scheme.
Once we change nsSimpleURI to be backed by MozURL we can probably remove this.
Differential Revision: https://phabricator.services.mozilla.com/D30707
--HG--
extra : moz-landing-system : lando
nsSimpleURI doesn't really have the concept of a relative URI.
Since unknown protocol schemes will ultimately fall back to using nsSimpleURI,
we need to make sure that resolving a URI with certain base still works as
before, when those URIs were nsStandardURLs, created by the protocol handlers.
To achieve this we check to see if the "relative path" has a scheme. If it
does, we just return it, to be parsed by NS_NewURI. Otherwise, we use
MozURL (based on rust-url) to figure out the correct relative URL we should
return. This by itself manages to fix several failing web-platform tests.
Differential Revision: https://phabricator.services.mozilla.com/D30705
--HG--
extra : moz-landing-system : lando
* Add main thread assertions for "resource" and "moz-extension" protocols
* Use ::GetSingleton() for resource and moz-extension protocol handlers
Differential Revision: https://phabricator.services.mozilla.com/D30698
--HG--
extra : moz-landing-system : lando
This way all of the nsIURI creation will go through NS_NewURIOnAnyThread.
NS_NewURIOnAnyThread will be renamed to NS_NewURI in the final patch.
Differential Revision: https://phabricator.services.mozilla.com/D30696
--HG--
extra : moz-landing-system : lando
These URL types need both specific applications to be installed on Linux, and for the pref to list them as supported.
We do these checks in nsGIOProtocolHandler::NewChannel instead of performing them when creating the URLs.
Differential Revision: https://phabricator.services.mozilla.com/D30695
--HG--
extra : moz-landing-system : lando
SSLTokensCache is a simple memory only storage for resumption tokens which are get and set using API for external TLS session caches in NSS.
Differential Revision: https://phabricator.services.mozilla.com/D29465
--HG--
extra : moz-landing-system : lando
This patch uses the flag to exempt channels from classification, but it
doesn't include the use cases of this flag.
See Bug 1442496 for the list of the call sites should use this flag.
Differential Revision: https://phabricator.services.mozilla.com/D22112
--HG--
extra : moz-landing-system : lando
In this patch, we move from a model where URL classification is opt-in
(by specifying LOAD_CLASSIFIER_URI) to a model where it is enforced by
default unless a channel opts out or is deemed to be a critical channel
based on simple heuristics.
The heuristics exempt a channel from classification if it is triggered
by system with an exception when it is a top level load.
To ensure critical channels are never classified, we also exempt
channels which are flagged as "BeConservative" (implemented in bug 1321783).
Another load flag LOAD_BYPASS_URL_CLASSIFIER is also introduced
for the same reason.
Differential Revision: https://phabricator.services.mozilla.com/D22110
--HG--
extra : moz-landing-system : lando
This patch uses the flag to exempt channels from classification, but it
doesn't include the use cases of this flag.
See Bug 1442496 for the list of the call sites should use this flag.
Differential Revision: https://phabricator.services.mozilla.com/D22112
--HG--
extra : moz-landing-system : lando
In this patch, we move from a model where URL classification is opt-in
(by specifying LOAD_CLASSIFIER_URI) to a model where it is enforced by
default unless a channel opts out or is deemed to be a critical channel
based on simple heuristics.
The heuristics exempt a channel from classification if it is triggered
by system with an exception when it is a top level load.
To ensure critical channels are never classified, we also exempt
channels which are flagged as "BeConservative" (implemented in bug 1321783).
Another load flag LOAD_BYPASS_URL_CLASSIFIER is also introduced
for the same reason.
Differential Revision: https://phabricator.services.mozilla.com/D22110
--HG--
extra : moz-landing-system : lando
1. Make nsHttpChannel::OnBeforeConnect async.
2. There are two ways to get the result from NS_ShouldSecureUpgrade. One is getting the result synchronously from the input reference and the other is via the provided callback.
Note that the callback is only used when the storage is not ready to read at startup.
Differential Revision: https://phabricator.services.mozilla.com/D20191
--HG--
extra : moz-landing-system : lando
This is more complex than merely modifying NS_GetDefaultReferrerPolicy()
because at the time most (all?) callers call nsIHttpChannel::SetReferrer/
nsIHttpChannel::SetReferrerWithPolicy before the channel is opened,
which means we won't know whether the channel is a tracking resource or
not yet. So we would need to re-evaluate this decision after that
information becomes available. For that, we need to remember the
original URI argument passed to these functions since that information
is currently destroyed and isn't persisted anywhere in the system.
Differential Revision: https://phabricator.services.mozilla.com/D20901
--HG--
extra : moz-landing-system : lando