diff --git a/samples/Http2SampleApp/Http2SampleApp.csproj b/samples/Http2SampleApp/Http2SampleApp.csproj
index 683e6e4041..cd660a6c80 100644
--- a/samples/Http2SampleApp/Http2SampleApp.csproj
+++ b/samples/Http2SampleApp/Http2SampleApp.csproj
@@ -15,7 +15,9 @@
-
+
+ PreserveNewest
+
diff --git a/samples/Http2SampleApp/testCert.pfx b/samples/Http2SampleApp/testCert.pfx
new file mode 100644
index 0000000000..7118908c2d
Binary files /dev/null and b/samples/Http2SampleApp/testCert.pfx differ
diff --git a/src/Kestrel.Core/Features/ITlsApplicationProtocolFeature.cs b/src/Kestrel.Core/Features/ITlsApplicationProtocolFeature.cs
index 7ad37730d5..8adca3f0e8 100644
--- a/src/Kestrel.Core/Features/ITlsApplicationProtocolFeature.cs
+++ b/src/Kestrel.Core/Features/ITlsApplicationProtocolFeature.cs
@@ -1,11 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System;
+
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Features
{
- // TODO: this should be merged with ITlsConnectionFeature
public interface ITlsApplicationProtocolFeature
{
- string ApplicationProtocol { get; }
+ ReadOnlyMemory ApplicationProtocol { get; }
}
}
diff --git a/src/Kestrel.Core/Internal/HttpConnection.cs b/src/Kestrel.Core/Internal/HttpConnection.cs
index 1ac4945ae4..fcd2c314a8 100644
--- a/src/Kestrel.Core/Internal/HttpConnection.cs
+++ b/src/Kestrel.Core/Internal/HttpConnection.cs
@@ -23,6 +23,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
{
public class HttpConnection : ITimeoutControl, IConnectionTimeoutFeature, IRequestProcessor
{
+ private static readonly ReadOnlyMemory Http2Id = new ReadOnlyMemory(new[] { (byte)'h', (byte)'2' });
+
private readonly HttpConnectionContext _context;
private readonly TaskCompletionSource