Skip to content
Merged
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 @@ -171,7 +171,7 @@ await server.AcceptConnectionAsync(async connection =>

[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersAndCompressionUris))]
public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Configuration.Http.RemoteServer remoteServer, Uri uri)
public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_GZip(Configuration.Http.RemoteServer remoteServer, Uri uri)
{
// Sync API supported only up to HTTP/1.1
if (!TestAsync && remoteServer.HttpVersion.Major >= 2)
Expand Down Expand Up @@ -205,10 +205,14 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Configu
[Theory]
[InlineData("http://httpbin.org/deflate", "\"deflated\": true")]
[InlineData("https://httpbin.org/deflate", "\"deflated\": true")]
[InlineData("http://httpbin.org/gzip", "\"gzipped\": true")]
[InlineData("https://httpbin.org/gzip", "\"gzipped\": true")]
public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(string uri, string expectedContent)
public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed_Deflate(string uri, string expectedContent)
{
if (IsWinHttpHandler)
{
// WinHttpHandler targets netstandard2.0 and still erroneously uses DeflateStream rather than ZlibStream for deflate.
return;
}

HttpClientHandler handler = CreateHttpClientHandler();
handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
using (HttpClient client = CreateHttpClient(handler))
Expand Down