Skip to content

Commit 6a43d05

Browse files
Fix incorrect HTTP/2 method header decoding (#40412)
Co-authored-by: Aditya Mandaleeka <[email protected]>
1 parent 6d21cf1 commit 6a43d05

18 files changed

+129
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ private void OnHeaderCore(HeaderType headerType, int? staticTableIndex, ReadOnly
14421442
{
14431443
UpdateHeaderParsingState(value, GetPseudoHeaderField(staticTableIndex.GetValueOrDefault()));
14441444

1445-
_currentHeadersStream.OnHeader(staticTableIndex.GetValueOrDefault(), indexOnly: true, name, value);
1445+
_currentHeadersStream.OnHeader(staticTableIndex.GetValueOrDefault(), indexOnly: false, name, value);
14461446
}
14471447
else
14481448
{

src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ private void OnHeaderCore(HeaderType headerType, int? staticTableIndex, ReadOnly
314314
{
315315
UpdateHeaderParsingState(value, GetPseudoHeaderField(staticTableIndex.GetValueOrDefault()));
316316

317-
OnHeader(staticTableIndex.GetValueOrDefault(), indexOnly: true, name, value);
317+
OnHeader(staticTableIndex.GetValueOrDefault(), indexOnly: false, name, value);
318318
}
319319
else
320320
{

src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj

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

1515
<ItemGroup>
1616
<Compile Include="$(KestrelSharedSourceRoot)\PooledStreamStack.cs" Link="Internal\PooledStreamStack.cs" />
17+
<Compile Include="$(KestrelSharedSourceRoot)\HPackHeaderWriter.cs" Link="Internal\Http2\HPackHeaderWriter.cs" />
18+
<Compile Include="$(KestrelSharedSourceRoot)\Http2HeadersEnumerator.cs" Link="Internal\Http2\Http2HeadersEnumerator.cs" />
1719
<Compile Include="$(SharedSourceRoot)CertificateGeneration\**\*.cs" />
1820
<Compile Include="$(SharedSourceRoot)ValueTaskExtensions\**\*.cs" />
1921
<Compile Include="$(SharedSourceRoot)UrlDecoder\**\*.cs" />

src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
55
<TestGroupName>Kestrel.Core.Tests</TestGroupName>
6-
<DefineConstants>$(DefineConstants);KESTREL</DefineConstants>
6+
<DefineConstants>$(DefineConstants);KESTREL;IS_TESTS</DefineConstants>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
1111
<Compile Include="$(SharedSourceRoot)Buffers.Testing\*.cs" />
1212
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
1313
<Compile Include="$(KestrelSharedSourceRoot)KnownHeaders.cs" LinkBase="shared" />
14+
<Compile Include="$(KestrelSharedSourceRoot)\HPackHeaderWriter.cs" Link="Http2\HPackHeaderWriter.cs" />
15+
<Compile Include="$(KestrelSharedSourceRoot)\Http2HeadersEnumerator.cs" Link="Http2\Http2HeadersEnumerator.cs" />
1416
<Compile Include="$(RepoRoot)src\Shared\Buffers.MemoryPool\*.cs" LinkBase="MemoryPool" />
1517
<Compile Include="$(KestrelSharedSourceRoot)\CorrelationIdGenerator.cs" Link="Internal\CorrelationIdGenerator.cs" />
1618
<Compile Include="$(SharedSourceRoot)test\Shared.Tests\runtime\Http2\*.cs" LinkBase="Shared\runtime\Http2" />

src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<ItemGroup>
88
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
9-
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
9+
<Compile Include="$(KestrelSharedSourceRoot)test\TestResources.cs" Link="shared\TestResources.cs" />
1010
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
1111
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.crt" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
1212
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.key" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />

src/Servers/Kestrel/Transport.Quic/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

99
<ItemGroup>
1010
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
11-
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
11+
<Compile Include="$(KestrelSharedSourceRoot)test\HttpEventSourceListener.cs" Link="shared\HttpEventSourceListener.cs" />
12+
<Compile Include="$(KestrelSharedSourceRoot)test\TestResources.cs" Link="shared\TestResources.cs" />
13+
<Compile Include="$(KestrelSharedSourceRoot)test\StreamExtensions.cs" Link="shared\StreamExtensions.cs" />
14+
<Compile Include="$(KestrelSharedSourceRoot)test\KestrelTestLoggerProvider.cs" Link="shared\KestrelTestLoggerProvider.cs" />
15+
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLoggerLoggedTest.cs" Link="shared\TestApplicationErrorLoggerLoggedTest.cs" />
16+
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLogger.cs" Link="shared\TestApplicationErrorLogger.cs" />
1217
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\IHostPortExtensions.cs" Link="shared\TransportTestHelpers\IHostPortExtensions.cs" />
1318
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\MsQuicSupportedAttribute.cs" Link="shared\TransportTestHelpers\MsQuicSupportedAttribute.cs" />
1419
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />

src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2ConnectionBenchmarkBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Microsoft.Extensions.Logging.Abstractions;
2323
using Microsoft.Extensions.Primitives;
2424
using Microsoft.Net.Http.Headers;
25+
using Http2HeadersEnumerator = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http2HeadersEnumerator;
2526

2627
namespace Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks;
2728

src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2HeadersEnumeratorBenchmark.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
77
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
88
using Microsoft.Extensions.Primitives;
9+
using Http2HeadersEnumerator = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http2HeadersEnumerator;
910

1011
namespace Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks;
1112

src/Servers/Kestrel/perf/Microbenchmarks/Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ServerGarbageCollection>true</ServerGarbageCollection>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<TieredCompilation>false</TieredCompilation>
9+
<DefineConstants>$(DefineConstants);IS_BENCHMARKS</DefineConstants>
910
</PropertyGroup>
1011

1112
<ItemGroup>
@@ -15,6 +16,8 @@
1516
<Compile Include="$(KestrelSharedSourceRoot)\CompletionPipeReader.cs" />
1617
<Compile Include="$(KestrelSharedSourceRoot)\CompletionPipeWriter.cs" />
1718
<Compile Include="$(KestrelSharedSourceRoot)test\PipeWriterHttp2FrameExtensions.cs" Link="Internal\PipeWriterHttp2FrameExtensions.cs" />
19+
<Compile Include="$(KestrelSharedSourceRoot)\HPackHeaderWriter.cs" Link="Http2\HPackHeaderWriter.cs" />
20+
<Compile Include="$(KestrelSharedSourceRoot)\Http2HeadersEnumerator.cs" Link="Http2\Http2HeadersEnumerator.cs" />
1821
<Compile Include="$(RepoRoot)src\Shared\Buffers.MemoryPool\*.cs" LinkBase="MemoryPool" />
1922
<Compile Include="$(KestrelSharedSourceRoot)test\KestrelTestLoggerProvider.cs" />
2023
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLogger.cs" />

src/Servers/Kestrel/Core/src/Internal/Http2/HPackHeaderWriter.cs renamed to src/Servers/Kestrel/shared/HPackHeaderWriter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
using System.Net.Http;
55
using System.Net.Http.HPack;
66

7+
#if !(IS_TESTS || IS_BENCHMARKS)
78
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
9+
#else
10+
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests;
11+
#endif
812

13+
// This file is used by Kestrel to write response headers and tests to write request headers.
14+
// To avoid adding test code to Kestrel this file is shared. Test specifc code is excluded from Kestrel by ifdefs.
915
internal static class HPackHeaderWriter
1016
{
1117
/// <summary>

src/Servers/Kestrel/Core/src/Internal/Http2/Http2HeadersEnumerator.cs renamed to src/Servers/Kestrel/shared/Http2HeadersEnumerator.cs

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,32 @@
77
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
88
using Microsoft.Extensions.Primitives;
99

10+
#if !(IS_TESTS || IS_BENCHMARKS)
1011
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
12+
#else
13+
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests;
14+
#endif
1115

16+
#nullable enable
17+
18+
// This file is used by Kestrel to write response headers and tests to write request headers.
19+
// To avoid adding test code to Kestrel this file is shared. Test specifc code is excluded from Kestrel by ifdefs.
1220
internal sealed class Http2HeadersEnumerator : IEnumerator<KeyValuePair<string, string>>
1321
{
1422
private enum HeadersType : byte
1523
{
1624
Headers,
1725
Trailers,
18-
Untyped
26+
#if IS_TESTS || IS_BENCHMARKS
27+
Untyped,
28+
#endif
1929
}
2030
private HeadersType _headersType;
2131
private HttpResponseHeaders.Enumerator _headersEnumerator;
2232
private HttpResponseTrailers.Enumerator _trailersEnumerator;
33+
#if IS_TESTS || IS_BENCHMARKS
2334
private IEnumerator<KeyValuePair<string, StringValues>>? _genericEnumerator;
35+
#endif
2436
private StringValues.Enumerator _stringValuesEnumerator;
2537
private bool _hasMultipleValues;
2638
private KnownHeaderType _knownHeaderType;
@@ -47,6 +59,7 @@ public void Initialize(HttpResponseTrailers headers)
4759
_hasMultipleValues = false;
4860
}
4961

62+
#if IS_TESTS || IS_BENCHMARKS
5063
public void Initialize(IDictionary<string, StringValues> headers)
5164
{
5265
switch (headers)
@@ -67,6 +80,7 @@ public void Initialize(IDictionary<string, StringValues> headers)
6780

6881
_hasMultipleValues = false;
6982
}
83+
#endif
7084

7185
public bool MoveNext()
7286
{
@@ -89,12 +103,36 @@ public bool MoveNext()
89103
}
90104
else
91105
{
106+
#if IS_TESTS || IS_BENCHMARKS
92107
return _genericEnumerator!.MoveNext()
93-
? SetCurrent(_genericEnumerator.Current.Key, _genericEnumerator.Current.Value, default)
108+
? SetCurrent(_genericEnumerator.Current.Key, _genericEnumerator.Current.Value, GetKnownRequestHeaderType(_genericEnumerator.Current.Key))
94109
: false;
110+
#else
111+
ThrowUnexpectedHeadersType();
112+
return false;
113+
#endif
95114
}
96115
}
97116

117+
#if IS_TESTS || IS_BENCHMARKS
118+
private static KnownHeaderType GetKnownRequestHeaderType(string headerName)
119+
{
120+
switch (headerName)
121+
{
122+
case ":method":
123+
return KnownHeaderType.Method;
124+
default:
125+
return default;
126+
}
127+
}
128+
#else
129+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
130+
private static void ThrowUnexpectedHeadersType()
131+
{
132+
throw new InvalidOperationException("Unexpected headers collection type.");
133+
}
134+
#endif
135+
98136
private bool MoveNextOnStringEnumerator(string key)
99137
{
100138
var result = _stringValuesEnumerator.MoveNext();
@@ -134,7 +172,11 @@ public void Reset()
134172
}
135173
else
136174
{
175+
#if IS_TESTS || IS_BENCHMARKS
137176
_genericEnumerator!.Reset();
177+
#else
178+
ThrowUnexpectedHeadersType();
179+
#endif
138180
}
139181
_stringValuesEnumerator = default;
140182
_knownHeaderType = default;
@@ -199,6 +241,11 @@ internal static int GetResponseHeaderStaticTableId(KnownHeaderType responseHeade
199241
return H2StaticTable.ContentLength;
200242
default:
201243
return -1;
244+
#if IS_TESTS || IS_BENCHMARKS
245+
// Include request headers for tests.
246+
case KnownHeaderType.Method:
247+
return H2StaticTable.MethodGet;
248+
#endif
202249
}
203250
}
204251
}

src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal async ValueTask<Http3ControlStream> GetInboundControlStream()
107107
if (_inboundControlStream == null)
108108
{
109109
var reader = MultiplexedConnectionContext.ToClientAcceptQueue.Reader;
110-
#if IS_FUNCTIONAL_TESTS
110+
#if IS_TESTS
111111
while (await reader.WaitToReadAsync().DefaultTimeout())
112112
#else
113113
while (await reader.WaitToReadAsync())
@@ -147,7 +147,7 @@ internal async Task WaitForConnectionErrorAsync<TException>(bool ignoreNonGoAway
147147
AssertConnectionError<TException>(expectedErrorCode, matchExpectedErrorMessage, expectedErrorMessage);
148148

149149
// Verify HttpConnection.ProcessRequestsAsync has exited.
150-
#if IS_FUNCTIONAL_TESTS
150+
#if IS_TESTS
151151
await _connectionTask.DefaultTimeout();
152152
#else
153153
await _connectionTask;
@@ -461,7 +461,7 @@ protected Task SendAsync(ReadOnlySpan<byte> span)
461461
protected static Task FlushAsync(PipeWriter writableBuffer)
462462
{
463463
var task = writableBuffer.FlushAsync();
464-
#if IS_FUNCTIONAL_TESTS
464+
#if IS_TESTS
465465
return task.AsTask().DefaultTimeout();
466466
#else
467467
return task.GetAsTask();
@@ -477,7 +477,7 @@ internal async Task ReceiveEndAsync()
477477
}
478478
}
479479

480-
#if IS_FUNCTIONAL_TESTS
480+
#if IS_TESTS
481481
protected Task<ReadResult> ReadApplicationInputAsync()
482482
{
483483
return Pair.Application.Input.ReadAsync().AsTask().DefaultTimeout();

src/Servers/Kestrel/shared/test/PipeWriterHttp2FrameExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
using System.IO.Pipelines;
99
using System.Net.Http.HPack;
1010
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
11+
using Http2HeadersEnumerator = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http2HeadersEnumerator;
12+
using HPackHeaderWriter = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.HPackHeaderWriter;
1113

1214
namespace Microsoft.AspNetCore.Testing;
1315

src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using Microsoft.AspNetCore.Server.Kestrel.FunctionalTests;
2323
using Microsoft.AspNetCore.Server.Kestrel.Https;
2424
using Microsoft.AspNetCore.Server.Kestrel.Https.Internal;
25-
using Microsoft.AspNetCore.Server.Kestrel.Tests;
2625
using Microsoft.AspNetCore.Testing;
2726
using Microsoft.Extensions.Hosting;
2827
using Microsoft.Extensions.Logging;

src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,41 @@ public async Task HEADERS_Received_KnownOrCustomMethods_Accepted(string method)
103103
};
104104
await InitializeConnectionAsync(_echoMethodNoBody);
105105

106+
// First request
106107
await StartStreamAsync(1, headers, endStream: true);
107108

108-
var headersFrame = await ExpectAsync(Http2FrameType.HEADERS,
109+
var headersFrame1 = await ExpectAsync(Http2FrameType.HEADERS,
109110
withLength: 45 + method.Length,
110111
withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS | Http2HeadersFrameFlags.END_STREAM),
111112
withStreamId: 1);
112113

113-
await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false);
114+
_hpackDecoder.Decode(headersFrame1.PayloadSequence, endHeaders: false, handler: this);
114115

115-
_hpackDecoder.Decode(headersFrame.PayloadSequence, endHeaders: false, handler: this);
116+
Assert.Equal(4, _decodedHeaders.Count);
117+
Assert.Contains("date", _decodedHeaders.Keys, StringComparer.OrdinalIgnoreCase);
118+
Assert.Equal("200", _decodedHeaders[HeaderNames.Status]);
119+
Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]);
120+
Assert.Equal(method, _decodedHeaders["Method"]);
121+
_decodedHeaders.Clear();
122+
123+
// Second request (will use dynamic table indexes)
124+
await StartStreamAsync(3, headers, endStream: true);
125+
126+
var headersFrame2 = await ExpectAsync(Http2FrameType.HEADERS,
127+
withLength: 7,
128+
withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS | Http2HeadersFrameFlags.END_STREAM),
129+
withStreamId: 3);
130+
131+
await StopConnectionAsync(expectedLastStreamId: 3, ignoreNonGoAwayFrames: false);
132+
133+
_hpackDecoder.Decode(headersFrame2.PayloadSequence, endHeaders: false, handler: this);
116134

117135
Assert.Equal(4, _decodedHeaders.Count);
118136
Assert.Contains("date", _decodedHeaders.Keys, StringComparer.OrdinalIgnoreCase);
119137
Assert.Equal("200", _decodedHeaders[HeaderNames.Status]);
120138
Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]);
121139
Assert.Equal(method, _decodedHeaders["Method"]);
140+
_decodedHeaders.Clear();
122141
}
123142

124143
[Fact]

src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
<ServerGarbageCollection>true</ServerGarbageCollection>
55
<TestGroupName>InMemory.FunctionalTests</TestGroupName>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7-
<DefineConstants>$(DefineConstants);IS_FUNCTIONAL_TESTS</DefineConstants>
7+
<DefineConstants>$(DefineConstants);IS_TESTS</DefineConstants>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
1212
<Compile Include="$(SharedSourceRoot)SyncPoint\SyncPoint.cs" Link="SyncPoint.cs" />
1313
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
1414
<Compile Include="$(KestrelSharedSourceRoot)test\Http3\*.cs" LinkBase="shared" />
15+
<Compile Include="$(KestrelSharedSourceRoot)\HPackHeaderWriter.cs" Link="Http2\HPackHeaderWriter.cs" />
16+
<Compile Include="$(KestrelSharedSourceRoot)\Http2HeadersEnumerator.cs" Link="Http2\Http2HeadersEnumerator.cs" />
1517
<Compile Include="$(RepoRoot)src\Shared\Buffers.MemoryPool\*.cs" LinkBase="MemoryPool" />
1618
<Compile Include="$(KestrelSharedSourceRoot)\CompletionPipeReader.cs" Link="Internal\CompletionPipeReader.cs" />
1719
<Compile Include="$(KestrelSharedSourceRoot)\CompletionPipeWriter.cs" Link="Internal\CompletionPipeWriter.cs" />

src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -10,7 +10,16 @@
1010
<Compile Include="..\BindTests\**\*.cs" />
1111
<Compile Include="..\Sockets.FunctionalTests\TransportSelector.cs" />
1212
<Compile Include="$(SharedSourceRoot)NullScope.cs" />
13-
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
13+
<Compile Include="$(KestrelSharedSourceRoot)test\TestServiceContext.cs" Link="shared\TestServiceContext.cs" />
14+
<Compile Include="$(KestrelSharedSourceRoot)test\TestConnection.cs" Link="shared\TestConnection.cs" />
15+
<Compile Include="$(KestrelSharedSourceRoot)test\MockSystemClock.cs" Link="shared\MockSystemClock.cs" />
16+
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLoggerLoggedTest.cs" Link="shared\TestApplicationErrorLoggerLoggedTest.cs" />
17+
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLogger.cs" Link="shared\TestApplicationErrorLogger.cs" />
18+
<Compile Include="$(KestrelSharedSourceRoot)test\StreamBackedTestConnection.cs" Link="shared\StreamBackedTestConnection.cs" />
19+
<Compile Include="$(KestrelSharedSourceRoot)test\TestResources.cs" Link="shared\TestResources.cs" />
20+
<Compile Include="$(KestrelSharedSourceRoot)test\TestConstants.cs" Link="shared\TestConstants.cs" />
21+
<Compile Include="$(KestrelSharedSourceRoot)test\KestrelTestLoggerProvider.cs" Link="shared\KestrelTestLoggerProvider.cs" />
22+
<Compile Include="$(KestrelSharedSourceRoot)test\LifetimeNotImplemented.cs" Link="shared\LifetimeNotImplemented.cs" />
1423
<Compile Include="$(KestrelSharedSourceRoot)test\TransportTestHelpers\*.cs" LinkBase="shared\TransportTestHelpers" />
1524
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
1625
</ItemGroup>

0 commit comments

Comments
 (0)