Skip to content

Commit 2a6443d

Browse files
Merge commit 'cec88a329584349fda070f4c7346b10538210ace' into internal-merge-6.0-2023-08-08-1013
2 parents 54ce617 + cec88a3 commit 2a6443d

32 files changed

+988
-147
lines changed

NuGet.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-runtime -->
7+
<add key="darc-int-dotnet-runtime-e40b3ab" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-e40b3abf/nuget/v3/index.json" />
78
<!-- End: Package sources from dotnet-runtime -->
89
<!-- Begin: Package sources from dotnet-efcore -->
10+
<add key="darc-int-dotnet-efcore-fa741b8" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-fa741b8b/nuget/v3/index.json" />
911
<!-- End: Package sources from dotnet-efcore -->
1012
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1113
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
@@ -23,8 +25,10 @@
2325
<clear />
2426
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
2527
<!-- Begin: Package sources from dotnet-efcore -->
28+
<add key="darc-int-dotnet-efcore-fa741b8" value="true" />
2629
<!-- End: Package sources from dotnet-efcore -->
2730
<!-- Begin: Package sources from dotnet-runtime -->
31+
<add key="darc-int-dotnet-runtime-e40b3ab" value="true" />
2832
<!-- End: Package sources from dotnet-runtime -->
2933
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
3034
</disabledPackageSources>

eng/Version.Details.xml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
-->
1010
<Dependencies>
1111
<ProductDependencies>
12-
<Dependency Name="dotnet-ef" Version="6.0.20">
12+
<Dependency Name="dotnet-ef" Version="6.0.21">
1313
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
14-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
14+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.20">
16+
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.21">
1717
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
18-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
18+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.20">
20+
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.21">
2121
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
22-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
22+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
2323
</Dependency>
24-
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.20">
24+
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.21">
2525
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
26-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
26+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
2727
</Dependency>
28-
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.20">
28+
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.21">
2929
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
30-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
30+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
3131
</Dependency>
32-
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.20">
32+
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.21">
3333
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
34-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
34+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
3535
</Dependency>
36-
<Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.20">
36+
<Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.21">
3737
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
38-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
38+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
3939
</Dependency>
40-
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.20">
40+
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.21">
4141
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
42-
<Sha>16d152f81ed675c2705aa38b8d6d4027b6525602</Sha>
42+
<Sha>fa741b8bad8eebb503bba99e078538f97aff3f5d</Sha>
4343
</Dependency>
4444
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0">
4545
<Uri>https://github.com/dotnet/runtime</Uri>
@@ -177,9 +177,9 @@
177177
<Uri>https://github.com/dotnet/runtime</Uri>
178178
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
179179
</Dependency>
180-
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.20-servicing.23320.17">
180+
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.21-servicing.23363.11">
181181
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
182-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
182+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
183183
</Dependency>
184184
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.1">
185185
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
@@ -245,40 +245,40 @@
245245
<Uri>https://github.com/dotnet/runtime</Uri>
246246
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
247247
</Dependency>
248-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.20">
248+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.21">
249249
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
250-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
250+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
251251
</Dependency>
252-
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.20">
252+
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.21">
253253
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
254-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
254+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
255255
</Dependency>
256-
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.20">
256+
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.21">
257257
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
258-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
258+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
259259
</Dependency>
260260
<!--
261261
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
262262
All Runtime.$rid packages should have the same version.
263263
-->
264-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.20">
264+
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.21">
265265
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
266-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
266+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
267267
</Dependency>
268-
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.20">
268+
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.21">
269269
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
270-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
270+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
271271
</Dependency>
272-
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.20-servicing.23320.17">
272+
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.21-servicing.23363.11">
273273
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
274-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
274+
<Sha>e40b3abf1b41621d4298642a5fd300ebf7cccf6d</Sha>
275275
</Dependency>
276276
</ProductDependencies>
277277
<ToolsetDependencies>
278278
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
279279
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.11">
280280
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
281-
<Sha>a08d9ce2caf02455c0b825bcdc32974bdf769a80</Sha>
281+
<Sha>0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8</Sha>
282282
</Dependency>
283283
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.23361.3">
284284
<Uri>https://github.com/dotnet/arcade</Uri>

eng/Versions.props

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
<PropertyGroup Label="Automated">
6464
<!-- Packages from dotnet/runtime -->
6565
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
66-
<MicrosoftNETCoreAppRefVersion>6.0.20</MicrosoftNETCoreAppRefVersion>
67-
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.20</MicrosoftNETCoreAppRuntimewinx64Version>
68-
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.20</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69-
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.20</MicrosoftNETRuntimeWebAssemblySdkVersion>
70-
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.20</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71-
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.20-servicing.23320.17</MicrosoftNETCoreBrowserDebugHostTransportVersion>
66+
<MicrosoftNETCoreAppRefVersion>6.0.21</MicrosoftNETCoreAppRefVersion>
67+
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.21</MicrosoftNETCoreAppRuntimewinx64Version>
68+
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.21</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69+
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.21</MicrosoftNETRuntimeWebAssemblySdkVersion>
70+
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.21</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71+
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.21-servicing.23363.11</MicrosoftNETCoreBrowserDebugHostTransportVersion>
7272
<MicrosoftExtensionsCachingAbstractionsVersion>6.0.0</MicrosoftExtensionsCachingAbstractionsVersion>
7373
<MicrosoftExtensionsCachingMemoryVersion>6.0.1</MicrosoftExtensionsCachingMemoryVersion>
7474
<MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0</MicrosoftExtensionsConfigurationAbstractionsVersion>
@@ -103,7 +103,7 @@
103103
<MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0</MicrosoftExtensionsOptionsDataAnnotationsVersion>
104104
<MicrosoftExtensionsOptionsVersion>6.0.0</MicrosoftExtensionsOptionsVersion>
105105
<MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion>
106-
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.20-servicing.23320.17</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
106+
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.21-servicing.23363.11</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
107107
<SystemDiagnosticsDiagnosticSourceVersion>6.0.1</SystemDiagnosticsDiagnosticSourceVersion>
108108
<SystemDiagnosticsEventLogVersion>6.0.0</SystemDiagnosticsEventLogVersion>
109109
<SystemDirectoryServicesProtocolsVersion>6.0.2</SystemDirectoryServicesProtocolsVersion>
@@ -122,14 +122,14 @@
122122
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
123123
<MicrosoftNETCorePlatformsVersion>6.0.11</MicrosoftNETCorePlatformsVersion>
124124
<!-- Packages from dotnet/efcore -->
125-
<dotnetefVersion>6.0.20</dotnetefVersion>
126-
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.20</MicrosoftEntityFrameworkCoreInMemoryVersion>
127-
<MicrosoftEntityFrameworkCoreRelationalVersion>6.0.20</MicrosoftEntityFrameworkCoreRelationalVersion>
128-
<MicrosoftEntityFrameworkCoreSqliteVersion>6.0.20</MicrosoftEntityFrameworkCoreSqliteVersion>
129-
<MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.20</MicrosoftEntityFrameworkCoreSqlServerVersion>
130-
<MicrosoftEntityFrameworkCoreToolsVersion>6.0.20</MicrosoftEntityFrameworkCoreToolsVersion>
131-
<MicrosoftEntityFrameworkCoreVersion>6.0.20</MicrosoftEntityFrameworkCoreVersion>
132-
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.20</MicrosoftEntityFrameworkCoreDesignVersion>
125+
<dotnetefVersion>6.0.21</dotnetefVersion>
126+
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.21</MicrosoftEntityFrameworkCoreInMemoryVersion>
127+
<MicrosoftEntityFrameworkCoreRelationalVersion>6.0.21</MicrosoftEntityFrameworkCoreRelationalVersion>
128+
<MicrosoftEntityFrameworkCoreSqliteVersion>6.0.21</MicrosoftEntityFrameworkCoreSqliteVersion>
129+
<MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.21</MicrosoftEntityFrameworkCoreSqlServerVersion>
130+
<MicrosoftEntityFrameworkCoreToolsVersion>6.0.21</MicrosoftEntityFrameworkCoreToolsVersion>
131+
<MicrosoftEntityFrameworkCoreVersion>6.0.21</MicrosoftEntityFrameworkCoreVersion>
132+
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.21</MicrosoftEntityFrameworkCoreDesignVersion>
133133
<!-- Packages from dotnet/arcade -->
134134
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.23361.3</MicrosoftDotNetBuildTasksInstallersVersion>
135135
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.23361.3</MicrosoftDotNetBuildTasksTemplatingVersion>

src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,15 @@ public async Task ClosesConnectionOnServerAbortOutOfProcess()
486486
var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
487487

488488
Assert.Equal(HttpStatusCode.BadGateway, response.StatusCode);
489+
490+
#if NEWSHIM_FUNCTIONALS
491+
// In-proc SocketConnection isn't used and there's no abort
489492
// 0x80072f78 ERROR_HTTP_INVALID_SERVER_RESPONSE The server returned an invalid or unrecognized response
490493
Assert.Contains("0x80072f78", await response.Content.ReadAsStringAsync());
494+
#else
495+
// 0x80072efe ERROR_INTERNET_CONNECTION_ABORTED The connection with the server was terminated abnormally
496+
Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync());
497+
#endif
491498
}
492499
catch (HttpRequestException)
493500
{

src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ protected override void OnRequestProcessingEnded()
9393
_http1Output.Dispose();
9494
}
9595

96-
public void OnInputOrOutputCompleted()
96+
void IRequestProcessor.OnInputOrOutputCompleted()
97+
{
98+
// Closed gracefully.
99+
_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!);
100+
CancelRequestAbortedToken();
101+
}
102+
103+
void IHttpOutputAborter.OnInputOrOutputCompleted()
97104
{
98105
_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient));
99106
CancelRequestAbortedToken();

src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected void ThrowUnexpectedEndOfRequestContent()
207207
// so we call OnInputOrOutputCompleted() now to prevent a race in our tests where a 400
208208
// response is written after observing the unexpected end of request content instead of just
209209
// closing the connection without a response as expected.
210-
_context.OnInputOrOutputCompleted();
210+
((IHttpOutputAborter)_context).OnInputOrOutputCompleted();
211211

212212
KestrelBadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent);
213213
}

src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public Http2Connection(HttpConnectionContext context)
150150
public void OnInputOrOutputCompleted()
151151
{
152152
TryClose();
153-
_frameWriter.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient));
153+
var useException = _context.ServiceContext.ServerOptions.FinOnError || _clientActiveStreamCount != 0;
154+
_frameWriter.Abort(useException ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!);
154155
}
155156

156157
public void Abort(ConnectionAbortedException ex)

src/Servers/Kestrel/Core/src/KestrelServerOptions.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,20 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core
2929
/// </summary>
3030
public class KestrelServerOptions
3131
{
32+
private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError";
33+
private static readonly bool _finOnError;
34+
35+
static KestrelServerOptions()
36+
{
37+
AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError);
38+
}
39+
3240
// internal to fast-path header decoding when RequestHeaderEncodingSelector is unchanged.
3341
internal static readonly Func<string, Encoding?> DefaultHeaderEncodingSelector = _ => null;
3442

43+
// Opt-out flag for back compat. Remove in 9.0 (or make public).
44+
internal bool FinOnError { get; set; } = _finOnError;
45+
3546
private Func<string, Encoding?> _requestHeaderEncodingSelector = DefaultHeaderEncodingSelector;
3647

3748
private Func<string, Encoding?> _responseHeaderEncodingSelector = DefaultHeaderEncodingSelector;

src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ internal interface ILibuvTrace : ILogger
1414

1515
void ConnectionWriteFin(string connectionId, string reason);
1616

17+
void ConnectionWriteRst(string connectionId, string reason);
18+
1719
void ConnectionWrite(string connectionId, int count);
1820

1921
void ConnectionWriteCallback(string connectionId, int status);

0 commit comments

Comments
 (0)