Bug 1896625 - Add a new flag to allow to always setup TLS tunnel, r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D212251
This commit is contained in:
Kershaw Chang
2024-06-13 15:27:00 +00:00
parent 156f6b8ef0
commit 8b08e917b0
9 changed files with 19 additions and 7 deletions

View File

@@ -3768,7 +3768,7 @@ HttpBaseChannel::GetOnlyConnect(bool* aOnlyConnect) {
}
NS_IMETHODIMP
HttpBaseChannel::SetConnectOnly() {
HttpBaseChannel::SetConnectOnly(bool aTlsTunnel) {
ENSURE_CALLED_BEFORE_CONNECT();
if (!mUpgradeProtocolCallback) {
@@ -3776,6 +3776,9 @@ HttpBaseChannel::SetConnectOnly() {
}
mCaps |= NS_HTTP_CONNECT_ONLY;
if (aTlsTunnel) {
mCaps |= NS_HTTP_TLS_TUNNEL;
}
mProxyResolveFlags = nsIProtocolProxyService::RESOLVE_PREFER_HTTPS_PROXY |
nsIProtocolProxyService::RESOLVE_ALWAYS_TUNNEL;
return SetLoadFlags(nsIRequest::INHIBIT_CACHING | nsIChannel::LOAD_ANONYMOUS |