From ae0e5e8341b2adf172f585d839e518a58c1d898e Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Mon, 9 Aug 2021 15:10:11 +0200 Subject: [PATCH] [wasm] Skip tests for ExpectContinue HTTP header (#57058) Skip tests for ExpectContinue HTTP header for WASM --- .../System/Net/Http/HttpClientHandlerTest.RemoteServer.cs | 2 +- .../Common/tests/System/Net/Http/HttpClientHandlerTest.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs index 9b99ef1d13ff6..9fd29a905f97f 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs @@ -607,7 +607,7 @@ public static IEnumerable ExpectContinueVersion() [OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))] [Theory] [MemberData(nameof(ExpectContinueVersion))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/53876", TestPlatforms.Browser)] + [SkipOnPlatform(TestPlatforms.Browser, "ExpectContinue not supported on Browser")] public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version version) { // Sync API supported only up to HTTP/1.1 diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index 27a8fc9bed247..17fcd64ee26d8 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -429,10 +429,10 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => if (PlatformDetection.IsNotBrowser) { request.Content.Headers.ContentMD5 = MD5.Create().ComputeHash(contentArray); + request.Headers.Expect.Add(new NameValueWithParametersHeaderValue("100-continue")); } request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded"); request.Headers.Date = DateTimeOffset.Parse("Tue, 15 Nov 1994 08:12:31 GMT"); - request.Headers.Expect.Add(new NameValueWithParametersHeaderValue("100-continue")); request.Headers.Add("Forwarded", "for=192.0.2.60;proto=http;by=203.0.113.43"); request.Headers.Add("From", "User Name "); request.Headers.Host = "en.wikipedia.org:8080"; @@ -1369,7 +1369,7 @@ public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse() #region Post Methods Tests [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/53876", TestPlatforms.Browser)] + [SkipOnPlatform(TestPlatforms.Browser, "ExpectContinue not supported on Browser")] public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1547,6 +1547,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "ExpectContinue not supported on Browser")] public async Task SendAsync_MultipleExpected100Responses_ReceivesCorrectResponse() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1642,6 +1643,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "ExpectContinue not supported on Browser")] public async Task SendAsync_No100ContinueReceived_RequestBodySentEventually() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value)