This commit is contained in:
Pranav K 2020-08-10 12:32:04 -07:00 коммит произвёл GitHub
Родитель d25a7658c8
Коммит 56be06bc7d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
14 изменённых файлов: 27 добавлений и 52 удалений

Просмотреть файл

@ -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)" />
<!--

Просмотреть файл

@ -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 -->

Просмотреть файл

@ -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" },

Просмотреть файл

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

Просмотреть файл

@ -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>

Просмотреть файл

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

Просмотреть файл

@ -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);

Просмотреть файл

@ -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" />

Просмотреть файл

@ -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.

Просмотреть файл

@ -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>

Просмотреть файл

@ -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

Просмотреть файл

@ -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();

Просмотреть файл

@ -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>

Просмотреть файл

@ -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" />