Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eng/SharedFramework.External.props
Original file line number Diff line number Diff line change
Expand Up @@ -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)" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removal and the test fixes should close #24392 Thanx❕

<ExternalAspNetCoreAppReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlPackageVersion)" />

<!--
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
<XunitAssertPackageVersion>$(XunitVersion)</XunitAssertPackageVersion>
<XunitExtensibilityCorePackageVersion>$(XunitVersion)</XunitExtensibilityCorePackageVersion>
<XunitExtensibilityExecutionPackageVersion>$(XunitVersion)</XunitExtensibilityExecutionPackageVersion>
<XUnitRunnerVisualStudioVersion>2.4.3</XUnitRunnerVisualStudioVersion>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teensy nit: Should we have a comment reminding us to remove this line once we pick up Arcade bits containing the dotnet/arcade#5908 fix❔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #24750

<MicrosoftDataSqlClientPackageVersion>1.0.19249.1</MicrosoftDataSqlClientPackageVersion>
</PropertyGroup>
<!-- Restore feeds -->
Expand Down
2 changes: 0 additions & 2 deletions src/Framework/test/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Hosting" />
<Reference Include="System.IO.Pipelines" />
<Reference Include="Microsoft.Extensions.HostFactoryResolver.Sources" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

<ItemGroup>
<Reference Include="Microsoft.Net.Http.Headers" />
<Reference Include="System.IO.Pipelines" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion src/ProjectTemplates/test/WorkerTemplateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Http.Features" />
<Reference Include="System.IO.Pipelines" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup. This was brought in transitively through Microsoft.AspNetCore.Http.Features since forever


<Compile Include="$(SharedSourceRoot)ActivatorUtilities\*.cs" />
<Compile Include="$(SharedSourceRoot)ParameterDefaultValue\*.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Servers/IIS/IIS/src/Core/IISHttpContextOfT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override async Task<bool> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}
Expand All @@ -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()
{
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -154,6 +128,7 @@ await h2Connection.ReceiveHeadersAsync(1, decodedHeaders =>
}

[ConditionalFact]
[RequiresNewHandler]
public async Task Reset_Http1_NotSupported()
{
var deploymentParameters = GetHttpsDeploymentParameters();
Expand All @@ -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()
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down