diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs index e78847e30..9bfa85d63 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 @@ public static class ReasonPhrases 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 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null) return _bytesStatus306; case 307: return _bytesStatus307; + case 308: + return _bytesStatus308; case 400: return _bytesStatus400; case 401: @@ -178,4 +181,4 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null) return Encoding.ASCII.GetBytes(statusCode.ToString(CultureInfo.InvariantCulture) + " " + reasonPhrase); } } -} \ No newline at end of file +}