Pranav K 5 лет назад
Родитель
Сommit
56be06bc7d

+ 0 - 1
eng/SharedFramework.External.props

@@ -40,7 +40,6 @@
     <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options.DataAnnotations"                 Version="$(MicrosoftExtensionsOptionsDataAnnotationsPackageVersion)" />
     <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options"                                 Version="$(MicrosoftExtensionsOptionsPackageVersion)" />
     <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Primitives"                              Version="$(MicrosoftExtensionsPrimitivesPackageVersion)" />
-    <ExternalAspNetCoreAppReference Include="System.IO.Pipelines"                                          Version="$(SystemIOPipelinesPackageVersion)" />
     <ExternalAspNetCoreAppReference Include="System.Security.Cryptography.Xml"                             Version="$(SystemSecurityCryptographyXmlPackageVersion)" />
 
     <!--

+ 1 - 0
eng/Versions.props

@@ -279,6 +279,7 @@
     <XunitAssertPackageVersion>$(XunitVersion)</XunitAssertPackageVersion>
     <XunitExtensibilityCorePackageVersion>$(XunitVersion)</XunitExtensibilityCorePackageVersion>
     <XunitExtensibilityExecutionPackageVersion>$(XunitVersion)</XunitExtensibilityExecutionPackageVersion>
+    <XUnitRunnerVisualStudioVersion>2.4.3</XUnitRunnerVisualStudioVersion>
     <MicrosoftDataSqlClientPackageVersion>1.0.19249.1</MicrosoftDataSqlClientPackageVersion>
   </PropertyGroup>
   <!-- Restore feeds -->

+ 0 - 2
src/Framework/test/TestData.cs

@@ -143,7 +143,6 @@ namespace Microsoft.AspNetCore
                 "Microsoft.Win32.SystemEvents",
                 "System.Diagnostics.EventLog",
                 "System.Drawing.Common",
-                "System.IO.Pipelines",
                 "System.Security.Cryptography.Pkcs",
                 "System.Security.Cryptography.Xml",
                 "System.Security.Permissions",
@@ -275,7 +274,6 @@ namespace Microsoft.AspNetCore
                 { "Microsoft.Net.Http.Headers", "5.0.0.0" },
                 { "Microsoft.Win32.Registry", "5.0.0.0" },
                 { "System.Diagnostics.EventLog", "5.0.0.0" },
-                { "System.IO.Pipelines", "5.0.0.0" },
                 { "System.Security.AccessControl", "5.0.0.0" },
                 { "System.Security.Cryptography.Cng", "5.0.0.0" },
                 { "System.Security.Cryptography.Xml", "5.0.0.0" },

+ 0 - 1
src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj

@@ -10,7 +10,6 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Hosting" />
-    <Reference Include="System.IO.Pipelines" />
     <Reference Include="Microsoft.Extensions.HostFactoryResolver.Sources" />
   </ItemGroup>
 

+ 1 - 1
src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj

@@ -14,7 +14,7 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.Extensions.Primitives" />
-    <Reference Include="System.IO.Pipelines" />
+    <Reference Include="System.IO.Pipelines" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
   </ItemGroup>
 
 </Project>

+ 0 - 1
src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj

@@ -20,7 +20,6 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.Net.Http.Headers" />
-    <Reference Include="System.IO.Pipelines" />
   </ItemGroup>
 
 </Project>

+ 2 - 1
src/ProjectTemplates/test/WorkerTemplateTest.cs

@@ -21,7 +21,8 @@ namespace Templates.Test
         public ProjectFactoryFixture ProjectFactory { get; }
         public ITestOutputHelper Output { get; }
 
-        [Fact]
+        [ConditionalFact]
+        [OSSkipCondition(OperatingSystems.Linux, SkipReason = "https://github.com/dotnet/sdk/issues/12831")]
         public async Task WorkerTemplateAsync()
         {
             Project = await ProjectFactory.GetOrCreateProject("worker", Output);

+ 0 - 1
src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj

@@ -13,7 +13,6 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Http.Features" />
-    <Reference Include="System.IO.Pipelines" />
 
     <Compile Include="$(SharedSourceRoot)ActivatorUtilities\*.cs" />
     <Compile Include="$(SharedSourceRoot)ParameterDefaultValue\*.cs" />

+ 1 - 1
src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs

@@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
                     // Dispose
                 }
 
-                if (!success && HasResponseStarted)
+                if (!success && HasResponseStarted && NativeMethods.HttpSupportTrailer(_pInProcessHandler))
                 {
                     // HTTP/2 INTERNAL_ERROR = 0x2 https://tools.ietf.org/html/rfc7540#section-7
                     // Otherwise the default is Cancel = 0x8.

+ 0 - 1
src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj

@@ -41,7 +41,6 @@
     <Reference Include="Microsoft.AspNetCore.Http.Extensions" />
     <Reference Include="Microsoft.AspNetCore.Http.Features" />
     <Reference Include="Microsoft.Extensions.FileProviders.Physical" />
-    <Reference Include="System.IO.Pipelines" />
     <Reference Include="System.Security.Principal.Windows" />
   </ItemGroup>
 

+ 1 - 1
src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs

@@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests.InProcess
             await _fixture.Client.RetryRequestAsync("/WaitingRequestCount", async message => await message.Content.ReadAsStringAsync() == "0");
         }
 
-        [ConditionalFact]
+        [ConditionalFact(Skip = "https://github.com/dotnet/aspnetcore/issues/24695")]
         public async Task ClientDisconnectCallbackStress()
         {
             // Fixture initialization fails if inside of the Task.Run, so send an

+ 21 - 39
src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ResetTests.cs

@@ -24,6 +24,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
     [Collection(PublishedSitesCollection.Name)]
     public class ResetTests : IISFunctionalTestBase
     {
+        private const string WindowsVersionForTrailers = "10.0.20180";
+
         public ResetTests(PublishedSitesFixture fixture) : base(fixture)
         {
         }
@@ -50,6 +52,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         };
 
         [ConditionalFact]
+        [RequiresNewHandler]
         [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10, SkipReason = "Http2 requires Win10")]
         public async Task AppException_BeforeResponseHeaders_500()
         {
@@ -87,37 +90,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10, SkipReason = "Http2 requires Win10")]
-        [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H1, SkipReason = "This is last version without custom Reset support")]
-        public async Task AppException_AfterHeaders_PriorOSVersions_ResetCancel()
-        {
-            var deploymentParameters = GetHttpsDeploymentParameters();
-            var deploymentResult = await DeployAsync(deploymentParameters);
-
-            await new HostBuilder()
-                .UseHttp2Cat(deploymentResult.ApplicationBaseUri + "AppException_AfterHeaders_PriorOSVersions_ResetCancel", async h2Connection =>
-                {
-                    await h2Connection.InitializeConnectionAsync();
-
-                    h2Connection.Logger.LogInformation("Initialized http2 connection. Starting stream 1.");
-
-                    await h2Connection.StartStreamAsync(1, GetHeaders("/AppException_AfterHeaders_PriorOSVersions_ResetCancel"), endStream: true);
-
-                    await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
-                    {
-                        Assert.Equal("200", decodedHeaders[HeaderNames.Status]);
-                    });
-
-                    var resetFrame = await h2Connection.ReceiveFrameAsync();
-                    Http2Utilities.VerifyResetFrame(resetFrame, expectedStreamId: 1, Http2ErrorCode.CANCEL);
-
-                    h2Connection.Logger.LogInformation("Connection stopped.");
-                })
-                .Build().RunAsync();
-        }
-
-        [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Custom Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Custom Reset support was added in Win10_20H2.")]
         public async Task AppException_AfterHeaders_ResetInternalError()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -154,6 +128,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
+        [RequiresNewHandler]
         public async Task Reset_Http1_NotSupported()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -168,6 +143,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
+        [RequiresNewHandler]
         [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10, SkipReason = "Http2 requires Win10")]
         [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H1, SkipReason = "This is last version without Reset support")]
         public async Task Reset_PriorOSVersions_NotSupported()
@@ -179,12 +155,13 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
             handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
             using HttpClient client = new HttpClient(handler);
             client.DefaultRequestVersion = HttpVersion.Version20;
-            var response = await client.GetStringAsync(deploymentResult.ApplicationBaseUri);
+            var response = await client.GetStringAsync(deploymentResult.ApplicationBaseUri + "Reset_PriorOSVersions_NotSupported");
             Assert.Equal("Hello World", response);
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_BeforeResponse_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -213,7 +190,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_BeforeResponse_Zero_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -242,7 +220,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_AfterResponseHeaders_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -279,7 +258,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_DuringResponseBody_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -316,9 +296,10 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
                 .Build().RunAsync();
         }
 
-        
+
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_BeforeRequestBody_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();
@@ -345,7 +326,8 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
 
         [ConditionalFact]
-        [MinimumOSVersion(OperatingSystems.Windows, "10.0.19529", SkipReason = "Reset support was added in Win10_20H2.")]
+        [RequiresNewHandler]
+        [MinimumOSVersion(OperatingSystems.Windows, WindowsVersionForTrailers, SkipReason = "Reset support was added in Win10_20H2.")]
         public async Task Reset_DuringRequestBody_Resets()
         {
             var deploymentParameters = GetHttpsDeploymentParameters();

+ 0 - 1
src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj

@@ -20,7 +20,6 @@
     <Reference Include="Microsoft.AspNetCore.HttpOverrides" />
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="System.IO.Pipelines" />
     <Reference Include="System.Security.Principal.Windows" />
   </ItemGroup>
 

+ 0 - 1
src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj

@@ -35,7 +35,6 @@
 
   <ItemGroup>
     <Reference Include="FSharp.Core" />
-    <Reference Include="System.IO.Pipelines" />
     <Reference Include="System.Reflection.Metadata" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe" />
     <Reference Include="System.Security.Cryptography.Cng" />