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 8be045e11c86e9..fcf578b63cd63d 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs @@ -97,6 +97,7 @@ public async Task SendAsync_SimpleGet_Success(Configuration.Http.RemoteServer re [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_MultipleRequestsReusingSameClient_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -113,6 +114,7 @@ public async Task SendAsync_MultipleRequestsReusingSameClient_Success(Configurat [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ResponseContentAfterClientAndHandlerDispose_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -162,6 +164,7 @@ public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK(Configur [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -177,6 +180,7 @@ public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(RemoteServersAndHeaderEchoUrisMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSent(Configuration.Http.RemoteServer remoteServer, Uri uri) { if (IsWinHttpHandler && !PlatformDetection.IsWindows10Version1709OrGreater) @@ -202,6 +206,7 @@ public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSen [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersHeaderValuesAndUris))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndValueSent(Configuration.Http.RemoteServer remoteServer, string name, string value, Uri uri) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -220,6 +225,7 @@ public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndValueSent(Con [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndHeaderEchoUrisMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_LargeRequestHeader_HeadersAndValuesSent(Configuration.Http.RemoteServer remoteServer, Uri uri) { // Unfortunately, our remote servers seem to have pretty strict limits (around 16K?) @@ -287,6 +293,7 @@ public static IEnumerable RemoteServersHeaderValuesAndUris() [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDeadlock(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -312,6 +319,7 @@ public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDead [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK(Configuration.Http.RemoteServer remoteServer) { // Sync API supported only up to HTTP/1.1 @@ -522,6 +530,7 @@ public static IEnumerable VerifyUploadServersStreamsAndExpectedData [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_NullContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -543,6 +552,7 @@ public async Task PostAsync_CallMethod_NullContent(Configuration.Http.RemoteServ [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -574,6 +584,7 @@ public static IEnumerable ExpectContinueVersion() [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(ExpectContinueVersion))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version version) { // Sync API supported only up to HTTP/1.1 @@ -613,6 +624,7 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, Version [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_Redirect_ResultingGetFormattedCorrectly(Configuration.Http.RemoteServer remoteServer) { const string ContentString = "This is the content string."; @@ -706,6 +718,7 @@ private async Task PostAsync_Redirect_LargePayload_Helper(Configuration.Http.Rem #if !NETFRAMEWORK [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_ReuseRequestContent_Success(Configuration.Http.RemoteServer remoteServer) { const string ContentString = "This is the content string."; @@ -726,6 +739,8 @@ public async Task PostAsync_ReuseRequestContent_Success(Configuration.Http.Remot [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethods))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53592", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_MethodCorrectlySent( string method, Uri serverUri) @@ -746,6 +761,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethodsThatAllowContent))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53591", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success( string method, Uri serverUri) @@ -775,6 +791,8 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(HttpMethodsThatDontAllowContent))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53591", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53592", TestPlatforms.Browser)] public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_NoBodySent( string method, Uri serverUri) @@ -820,6 +838,7 @@ public static IEnumerable SendAsync_SendSameRequestMultipleTimesDirect [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Success(Configuration.Http.RemoteServer remoteServer, string stringContent, int startingPosition) { using (var handler = new HttpMessageInvoker(CreateHttpClientHandler())) @@ -853,6 +872,7 @@ public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Succes [OuterLoop("Uses external servers")] [Theory] [MemberData(nameof(Http2Servers))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(Uri server) { // Sync API supported only up to HTTP/1.1 diff --git a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs index cb0c8a9b0ed581..77c4a02da6395e 100644 --- a/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/PostScenarioTest.cs @@ -30,6 +30,7 @@ public PostScenarioTest(ITestOutputHelper output) : base(output) { } #if !NETFRAMEWORK [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Configuration.Http.RemoteServer remoteServer) { const string requestBody = "ABC"; @@ -55,6 +56,7 @@ public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySen [OuterLoop("Uses external servers")] [MemberData(nameof(RemoteServersMemberData))] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostNoContentUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer) { await PostHelper(remoteServer, string.Empty, null, @@ -66,6 +68,12 @@ await PostHelper(remoteServer, string.Empty, null, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingContentLengthSemantics_Success(Configuration.Http.RemoteServer remoteServer) { + if (remoteServer.HttpVersion.Major >= 2 && PlatformDetection.IsBrowser) + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] + return; + } + await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), useContentLengthUpload: true, useChunkedEncodingUpload: false); } @@ -75,6 +83,12 @@ public async Task PostEmptyContentUsingContentLengthSemantics_Success(Configurat [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingChunkedEncoding_Success(Configuration.Http.RemoteServer remoteServer) { + if (remoteServer.HttpVersion.Major >= 2 && PlatformDetection.IsBrowser) + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] + return; + } + await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), useContentLengthUpload: false, useChunkedEncodingUpload: true); } @@ -84,6 +98,12 @@ public async Task PostEmptyContentUsingChunkedEncoding_Success(Configuration.Htt [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] public async Task PostEmptyContentUsingConflictingSemantics_Success(Configuration.Http.RemoteServer remoteServer) { + if (remoteServer.HttpVersion.Major >= 2 && PlatformDetection.IsBrowser) + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] + return; + } + await PostHelper(remoteServer, string.Empty, new StringContent(string.Empty), useContentLengthUpload: true, useChunkedEncodingUpload: true); } @@ -224,6 +244,7 @@ public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Conf [OuterLoop("Uses external servers")] [MemberData(nameof(RemoteServersMemberData))] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task PostAsync_EmptyContent_ContentTypeHeaderNotSent(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) diff --git a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs index d32b82adb6eaf1..3b01e68198c649 100644 --- a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs @@ -32,6 +32,7 @@ public static IEnumerable RemoteServersAndReadModes() } [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersAndReadModes))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetStreamAsync_ReadToEnd_Success(Configuration.Http.RemoteServer remoteServer, int readMode) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -127,6 +128,7 @@ public async Task GetStreamAsync_ReadToEnd_Success(Configuration.Http.RemoteServ [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -146,6 +148,7 @@ public async Task GetAsync_UseResponseHeadersReadAndCallLoadIntoBuffer_Success(C [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -170,6 +173,7 @@ public async Task GetAsync_UseResponseHeadersReadAndCopyToMemoryStream_Success(C [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task GetStreamAsync_ReadZeroBytes_Success(Configuration.Http.RemoteServer remoteServer) { using (HttpClient client = CreateHttpClientForRemoteServer(remoteServer)) @@ -185,6 +189,7 @@ public async Task GetStreamAsync_ReadZeroBytes_Success(Configuration.Http.Remote [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(RemoteServersMemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task ReadAsStreamAsync_Cancel_TaskIsCanceled(Configuration.Http.RemoteServer remoteServer) { var cts = new CancellationTokenSource(); diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs index ea51fda97067f7..5ac37fdd6ab7d5 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs @@ -1216,6 +1216,7 @@ await HttpAgnosticLoopbackServer.CreateClientAndServerAsync( [OuterLoop("Uses external servers")] [MemberData(nameof(VersionSelectionMemberData))] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowserDomSupportedOrNotBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/53018", TestPlatforms.Browser)] public async Task SendAsync_CorrectVersionSelected_ExternalServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, bool useSsl, object expectedResult) { RemoteServer remoteServer = null;