[libraries][tvOS] Update Issue causing System.Net.Requests to fail (#56624)
authorMitchell Hwang <16830051+mdh1418@users.noreply.github.com>
Fri, 6 Aug 2021 13:19:42 +0000 (09:19 -0400)
committerGitHub <noreply@github.com>
Fri, 6 Aug 2021 13:19:42 +0000 (09:19 -0400)
* [libraries][iOS][tvOS] Update Issue causing System.Net.Requests to fail

* [libraries][tvOS] Default preauthenticate in InnerSendAsync to false

* Defalt SendWithProxyAuthAsync doRequestAuth parameter to false

* [libraries] Add IsBinaryFormatterSupported ConditionalFact

* [libraries][tvOS] Add ActiveIssue for loopback request header reading failure

* Fix location of ActiveIssue

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.tvOS.cs
src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs
src/libraries/System.Net.Requests/tests/HttpWebResponseHeaderTest.cs
src/libraries/tests.proj

index 86b2eac..168f03e 100644 (file)
@@ -12,8 +12,8 @@ namespace System.Net.Http
         private static Task<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken)
         {
             return isProxyAuth ?
-                SendWithProxyAuthAsync(request, authUri, async, credentials, true, connectionPool, cancellationToken).AsTask() :
-                SendWithRequestAuthAsync(request, async, credentials, true, connectionPool, cancellationToken).AsTask();
+                SendWithProxyAuthAsync(request, authUri, async, credentials, false, connectionPool, cancellationToken).AsTask() :
+                SendWithRequestAuthAsync(request, async, credentials, false, connectionPool, cancellationToken).AsTask();
         }
 
         public static Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken)
index 728b2d9..b669972 100644 (file)
@@ -1459,6 +1459,7 @@ namespace System.Net.Tests
         [InlineData(true)]
         [InlineData(false)]
         [ActiveIssue("https://github.com/dotnet/runtime/issues/37087", TestPlatforms.Android)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56798", TestPlatforms.tvOS)]
         public async Task GetResponseAsync_UseDefaultCredentials_ExpectSuccess(bool useSsl)
         {
             var options = new LoopbackServer.Options { UseSsl = useSsl };
@@ -1499,6 +1500,7 @@ namespace System.Net.Tests
         [InlineData(true)]
         [InlineData(false)]
         [ActiveIssue("https://github.com/dotnet/runtime/issues/37087", TestPlatforms.Android)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56798", TestPlatforms.tvOS)]
         public async Task HaveResponse_GetResponseAsync_ExpectTrue(bool useSsl)
         {
             var options = new LoopbackServer.Options { UseSsl = useSsl };
@@ -1991,8 +1993,7 @@ namespace System.Net.Tests
             }
         }
 
-        [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/37087", TestPlatforms.Android)]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))]
         public void HttpWebRequest_Serialize_Fails()
         {
             using (MemoryStream fs = new MemoryStream())
index 39940b9..b91e908 100644 (file)
@@ -122,8 +122,7 @@ namespace System.Net.Tests
             });
         }
 
-        [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/37087", TestPlatforms.Android)]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBinaryFormatterSupported))]
         public async Task HttpWebResponse_Serialize_ExpectedResult()
         {
             await LoopbackServer.CreateServerAsync(async (server, url) =>
index 4e60c62..ca21cd0 100644 (file)
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj" />
 
     <!-- Crashes or hangs, did not produce testResults.xml -->
-    <!-- https://github.com/dotnet/runtime/issues/52117 -->
-    <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Requests/tests/System.Net.Requests.Tests.csproj" />
     <!-- https://github.com/dotnet/runtime/issues/52120 -->
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj" />