Removed code to set response headers - connection and upgrade as it should be set by caller e.g. WebSockets Middleware (#2329)

This commit is contained in:
brightcr 2018-02-19 22:06:28 +05:30 committed by David Fowler
parent 47109ebcce
commit a72e5db797
1 changed files with 0 additions and 9 deletions

View File

@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Features;
using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
@ -40,14 +39,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
StatusCode = StatusCodes.Status101SwitchingProtocols;
ReasonPhrase = "Switching Protocols";
ResponseHeaders["Connection"] = "Upgrade";
if (!ResponseHeaders.ContainsKey("Upgrade"))
{
StringValues values;
if (RequestHeaders.TryGetValue("Upgrade", out values))
{
ResponseHeaders["Upgrade"] = values;
}
}
await FlushAsync(default(CancellationToken));