Skip to content

Commit

Permalink
if doesn't support automatic decompression then don't do it
Browse files Browse the repository at this point in the history
  • Loading branch information
benOnside committed Mar 4, 2024
1 parent 2abf583 commit cd40a96
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ConfigCatClient/HttpConfigFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ private HttpClient CreateHttpClient()

if (this.httpClientHandler is null)
{
client = new HttpClient(new HttpClientHandler
var handler = new HttpClientHandler();
if (handler.SupportsAutomaticDecompression)
{
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
});
handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
}
client = new HttpClient(handler);
}
else
{
Expand Down

0 comments on commit cd40a96

Please sign in to comment.