Skip to content

Commit 23b4678

Browse files
authored
(#174) Adjust HttpClientFactory for browser-based decompression. (#182)
1 parent 9363545 commit 23b4678

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CommunityToolkit.Datasync.Client/Http/HttpClientFactory.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ internal static HttpMessageHandler CreatePipeline(IEnumerable<HttpMessageHandler
9797
internal static HttpMessageHandler GetDefaultHttpClientHandler()
9898
{
9999
HttpClientHandler handler = new();
100-
handler.SetAutomaticDecompression(handler.SupportsAutomaticDecompression);
100+
if (handler.SupportsAutomaticDecompression && !OperatingSystem.IsBrowser())
101+
{
102+
handler.SetAutomaticDecompression(handler.SupportsAutomaticDecompression);
103+
}
104+
101105
return handler;
102106
}
103107

0 commit comments

Comments
 (0)