From f07e7a5875bdfd2d29c410466720bdb4f0f12522 Mon Sep 17 00:00:00 2001 From: Chris R Date: Tue, 3 Jan 2017 13:54:11 -0800 Subject: [PATCH] Use the new 101 constant from Http Abstractions. --- src/Microsoft.AspNetCore.Server.HttpSys/Constants.cs | 1 - .../RequestProcessing/RequestContext.cs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.HttpSys/Constants.cs b/src/Microsoft.AspNetCore.Server.HttpSys/Constants.cs index f4b0b1884d..83a80676fb 100644 --- a/src/Microsoft.AspNetCore.Server.HttpSys/Constants.cs +++ b/src/Microsoft.AspNetCore.Server.HttpSys/Constants.cs @@ -13,7 +13,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys internal const string Close = "close"; internal const string Zero = "0"; internal const string SchemeDelimiter = "://"; - internal const int Status101SwitchingProtocols = 101; internal static Version V1_0 = new Version(1, 0); internal static Version V1_1 = new Version(1, 1); diff --git a/src/Microsoft.AspNetCore.Server.HttpSys/RequestProcessing/RequestContext.cs b/src/Microsoft.AspNetCore.Server.HttpSys/RequestProcessing/RequestContext.cs index 6cd4e48d18..78f1310f4d 100644 --- a/src/Microsoft.AspNetCore.Server.HttpSys/RequestProcessing/RequestContext.cs +++ b/src/Microsoft.AspNetCore.Server.HttpSys/RequestProcessing/RequestContext.cs @@ -9,6 +9,7 @@ using System.Security.Authentication.ExtendedProtection; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Server.HttpSys @@ -99,8 +100,8 @@ namespace Microsoft.AspNetCore.Server.HttpSys } // Set the status code and reason phrase - Response.StatusCode = Constants.Status101SwitchingProtocols; - Response.ReasonPhrase = HttpReasonPhrase.Get(Constants.Status101SwitchingProtocols); + Response.StatusCode = StatusCodes.Status101SwitchingProtocols; + Response.ReasonPhrase = HttpReasonPhrase.Get(StatusCodes.Status101SwitchingProtocols); Response.SendOpaqueUpgrade(); // TODO: Async Request.SwitchToOpaqueMode();