Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser][http] Fix HttpClientHandler "Supports*" properties regressions #39889

Merged
merged 4 commits into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, object?>? _properties;
public IDictionary<string, object?> Properties => _properties ??= new Dictionary<string, object?>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ public TimeSpan Expect100ContinueTimeout
}
}

internal bool SupportsAutomaticDecompression => true;
internal bool SupportsProxy => true;
internal bool SupportsRedirectConfiguration => true;

public IDictionary<string, object?> Properties =>
_settings._properties ?? (_settings._properties = new Dictionary<string, object?>());

Expand Down