We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8594f3e + 4f9dbd7 commit 4c4f188Copy full SHA for 4c4f188
src/Dotnet.Script.Core/ScriptDownloader.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.IO;
3
using System.IO.Compression;
4
+using System.Net;
5
using System.Net.Http;
6
using System.Threading.Tasks;
7
@@ -10,7 +11,12 @@ public class ScriptDownloader
10
11
{
12
public async Task<string> Download(string uri)
13
- using (HttpClient client = new HttpClient())
14
+ using (HttpClient client = new HttpClient(new HttpClientHandler
15
+ {
16
+ // Avoid Deflate due to bugs. For more info, see:
17
+ // https://github.com/weblinq/WebLinq/issues/132
18
+ AutomaticDecompression = DecompressionMethods.GZip
19
+ }))
20
21
using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead))
22
0 commit comments