From 6414ccc2fdd299737689afe92f8dc8c5ef2a4726 Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Mon, 13 Jun 2016 14:12:33 +0200 Subject: [PATCH] Added "308 Permanent Redirect" to ReasonPhrases From RFC7538 - https://tools.ietf.org/html/rfc7538 --- .../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..9bfa85d631 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs @@ -28,6 +28,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http private static readonly byte[] _bytesStatus305 = Encoding.ASCII.GetBytes("305 Use Proxy"); private static readonly byte[] _bytesStatus306 = Encoding.ASCII.GetBytes("306 Reserved"); private static readonly byte[] _bytesStatus307 = Encoding.ASCII.GetBytes("307 Temporary Redirect"); + private static readonly byte[] _bytesStatus308 = Encoding.ASCII.GetBytes("308 Permanent Redirect"); private static readonly byte[] _bytesStatus400 = Encoding.ASCII.GetBytes("400 Bad Request"); private static readonly byte[] _bytesStatus401 = Encoding.ASCII.GetBytes("401 Unauthorized"); private static readonly byte[] _bytesStatus402 = Encoding.ASCII.GetBytes("402 Payment Required"); @@ -107,6 +108,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http return _bytesStatus306; case 307: return _bytesStatus307; + case 308: + return _bytesStatus308; case 400: return _bytesStatus400; case 401: @@ -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 +}