diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs index eb577324faa16..4a6c5b26fbcad 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs @@ -120,6 +120,10 @@ public SslClientAuthenticationOptions SslOptions set => throw new PlatformNotSupportedException(); } + public bool SupportsAutomaticDecompression => false; + public bool SupportsProxy => false; + public bool SupportsRedirectConfiguration => false; + private Dictionary? _properties; public IDictionary Properties => _properties ??= new Dictionary(); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs index 996e42ca02c36..5540ba7f642cd 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs @@ -48,9 +48,9 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - public virtual bool SupportsAutomaticDecompression => true; - public virtual bool SupportsProxy => true; - public virtual bool SupportsRedirectConfiguration => true; + public virtual bool SupportsAutomaticDecompression => _underlyingHandler.SupportsAutomaticDecompression; + public virtual bool SupportsProxy => _underlyingHandler.SupportsProxy; + public virtual bool SupportsRedirectConfiguration => _underlyingHandler.SupportsRedirectConfiguration; public bool UseCookies { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs index 294b0c1734b76..9b122a615916c 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs @@ -273,6 +273,10 @@ public TimeSpan Expect100ContinueTimeout } } + internal bool SupportsAutomaticDecompression => true; + internal bool SupportsProxy => true; + internal bool SupportsRedirectConfiguration => true; + public IDictionary Properties => _settings._properties ?? (_settings._properties = new Dictionary());