Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Commit 2181158

Browse files
committed
React to Content-Md5 fix
1 parent f7c9b27 commit 2181158

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public async Task FlushBody_CompressesAndFlushes()
402402
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
403403

404404
IEnumerable<string> contentMD5 = null;
405-
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
405+
Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
406406
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
407407

408408
var body = await response.Content.ReadAsStreamAsync();
@@ -448,7 +448,7 @@ public async Task FlushAsyncBody_CompressesAndFlushes()
448448
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
449449

450450
IEnumerable<string> contentMD5 = null;
451-
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
451+
Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
452452
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
453453

454454
var body = await response.Content.ReadAsStreamAsync();
@@ -506,7 +506,7 @@ public async Task TrickleWriteAndFlush_FlushesEachWrite()
506506
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
507507

508508
IEnumerable<string> contentMD5 = null;
509-
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
509+
Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
510510
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
511511

512512
var body = await response.Content.ReadAsStreamAsync();
@@ -564,7 +564,7 @@ public async Task TrickleWriteAndFlushAsync_FlushesEachWrite()
564564
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
565565

566566
IEnumerable<string> contentMD5 = null;
567-
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
567+
Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
568568
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
569569

570570
var body = await response.Content.ReadAsStreamAsync();
@@ -789,7 +789,7 @@ private void CheckResponseCompressed(HttpResponseMessage response, int expectedB
789789
}
790790
}
791791
Assert.True(containsVaryAcceptEncoding);
792-
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
792+
Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5));
793793
Assert.Single(response.Content.Headers.ContentEncoding, "gzip");
794794
Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength);
795795
}
@@ -813,7 +813,7 @@ private void CheckResponseNotCompressed(HttpResponseMessage response, int expect
813813
{
814814
Assert.False(response.Headers.Contains(HeaderNames.Vary));
815815
}
816-
Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5));
816+
Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5));
817817
Assert.Empty(response.Content.Headers.ContentEncoding);
818818
Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength);
819819
}

0 commit comments

Comments
 (0)