diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 4fa7b92e..7b77fea0 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -402,7 +402,7 @@ public async Task FlushBody_CompressesAndFlushes() var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); IEnumerable contentMD5 = null; - Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); var body = await response.Content.ReadAsStreamAsync(); @@ -448,7 +448,7 @@ public async Task FlushAsyncBody_CompressesAndFlushes() var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); IEnumerable contentMD5 = null; - Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); var body = await response.Content.ReadAsStreamAsync(); @@ -506,7 +506,7 @@ public async Task TrickleWriteAndFlush_FlushesEachWrite() var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); IEnumerable contentMD5 = null; - Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); var body = await response.Content.ReadAsStreamAsync(); @@ -564,7 +564,7 @@ public async Task TrickleWriteAndFlushAsync_FlushesEachWrite() var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); IEnumerable contentMD5 = null; - Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); var body = await response.Content.ReadAsStreamAsync(); @@ -789,7 +789,7 @@ private void CheckResponseCompressed(HttpResponseMessage response, int expectedB } } Assert.True(containsVaryAcceptEncoding); - Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength); } @@ -813,7 +813,7 @@ private void CheckResponseNotCompressed(HttpResponseMessage response, int expect { Assert.False(response.Headers.Contains(HeaderNames.Vary)); } - Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5)); + Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5)); Assert.Empty(response.Content.Headers.ContentEncoding); Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength); }