Skip to content

Commit

Permalink
if doesn't support automatic decompression then don't do it (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
benOnside authored Mar 7, 2024
1 parent 2abf583 commit 985600c
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 985600c

Please sign in to comment.