diff --git a/eng/SharedFramework.External.props b/eng/SharedFramework.External.props index a43f82e80353..d9914be2e486 100644 --- a/eng/SharedFramework.External.props +++ b/eng/SharedFramework.External.props @@ -40,7 +40,6 @@ - diff --git a/src/Framework/test/TestData.cs b/src/Framework/test/TestData.cs index 2271d24ece6f..786a4ee2e97a 100644 --- a/src/Framework/test/TestData.cs +++ b/src/Framework/test/TestData.cs @@ -143,7 +143,6 @@ static TestData() "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 @@ static TestData() { "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" }, diff --git a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj index d91a72748dec..b4465d4958a7 100644 --- a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj +++ b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj @@ -10,7 +10,6 @@ - diff --git a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj index 0b7b768ca73b..573821ef754c 100644 --- a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj +++ b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj index 615358dbb406..65bb54c69cfc 100644 --- a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj +++ b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj @@ -20,7 +20,6 @@ - diff --git a/src/ProjectTemplates/test/WorkerTemplateTest.cs b/src/ProjectTemplates/test/WorkerTemplateTest.cs index 0a3bca6568ce..d7e471458510 100644 --- a/src/ProjectTemplates/test/WorkerTemplateTest.cs +++ b/src/ProjectTemplates/test/WorkerTemplateTest.cs @@ -21,7 +21,8 @@ public WorkerTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelpe 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); diff --git a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj index e83b0142a019..5cfbd655e99a 100644 --- a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -13,7 +13,6 @@ - diff --git a/src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs b/src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs index 8731cfa2de3f..390770b49a6d 100644 --- a/src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs +++ b/src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs @@ -59,7 +59,7 @@ public override async Task ProcessRequestAsync() // 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. diff --git a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj index d262f5cd0b44..de559faf6d26 100644 --- a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj +++ b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj @@ -41,7 +41,6 @@ - diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs index 4026166b593d..f057f153a8f9 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs @@ -66,7 +66,7 @@ await connection.Send( 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 diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ResetTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ResetTests.cs index 8bcca34d262c..bb6f29355b06 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ResetTests.cs +++ b/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 @@ public ResetTests(PublishedSitesFixture fixture) : base(fixture) }; [ConditionalFact] + [RequiresNewHandler] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10, SkipReason = "Http2 requires Win10")] public async Task AppException_BeforeResponseHeaders_500() { @@ -87,37 +90,8 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders => } [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 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders => } [ConditionalFact] + [RequiresNewHandler] public async Task Reset_Http1_NotSupported() { var deploymentParameters = GetHttpsDeploymentParameters(); @@ -168,6 +143,7 @@ public async Task Reset_Http1_NotSupported() } [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 @@ public async Task Reset_PriorOSVersions_NotSupported() 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 @@ public async Task Reset_BeforeResponse_Resets() } [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 @@ public async Task Reset_BeforeResponse_Zero_Resets() } [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 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders => } [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 @@ public async Task Reset_DuringResponseBody_Resets() .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 @@ public async Task Reset_BeforeRequestBody_Resets() } [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(); diff --git a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj index addaf56ff283..b76aa029d628 100644 --- a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj +++ b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj @@ -20,7 +20,6 @@ - diff --git a/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj b/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj index c3956a4c1946..d3bba11e6d5b 100644 --- a/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj +++ b/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj @@ -35,7 +35,6 @@ -