From eb74a19f9a343ff7911352337d00c6d0621b1e93 Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Tue, 14 Jun 2016 11:25:22 +0200 Subject: [PATCH] Added "451 Unavailable For Legal Reasons" to ReasonPhrases From RFC7725 - https://tools.ietf.org/html/rfc7725 --- .../Internal/Http/ReasonPhrases.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs index e78847e300..035cbf1b06 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs @@ -51,6 +51,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http private static readonly byte[] _bytesStatus423 = Encoding.ASCII.GetBytes("423 Locked"); private static readonly byte[] _bytesStatus424 = Encoding.ASCII.GetBytes("424 Failed Dependency"); private static readonly byte[] _bytesStatus426 = Encoding.ASCII.GetBytes("426 Upgrade Required"); + private static readonly byte[] _bytesStatus451 = Encoding.ASCII.GetBytes("451 Unavailable For Legal Reasons"); private static readonly byte[] _bytesStatus500 = Encoding.ASCII.GetBytes("500 Internal Server Error"); private static readonly byte[] _bytesStatus501 = Encoding.ASCII.GetBytes("501 Not Implemented"); private static readonly byte[] _bytesStatus502 = Encoding.ASCII.GetBytes("502 Bad Gateway"); @@ -153,6 +154,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http return _bytesStatus424; case 426: return _bytesStatus426; + case 451: + return _bytesStatus451; case 500: return _bytesStatus500; case 501: @@ -178,4 +181,4 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http return Encoding.ASCII.GetBytes(statusCode.ToString(CultureInfo.InvariantCulture) + " " + reasonPhrase); } } -} \ No newline at end of file +}