Use the new 101 constant from Http Abstractions.
This commit is contained in:
parent
87e6c4ed3f
commit
f07e7a5875
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue