Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit a72406e

Browse files
authored
Added "308 Permanent Redirect" to ReasonPhrases
From RFC7538 - https://tools.ietf.org/html/rfc7538
1 parent b4632c2 commit a72406e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ReasonPhrases.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public static class ReasonPhrases
2828
private static readonly byte[] _bytesStatus305 = Encoding.ASCII.GetBytes("305 Use Proxy");
2929
private static readonly byte[] _bytesStatus306 = Encoding.ASCII.GetBytes("306 Reserved");
3030
private static readonly byte[] _bytesStatus307 = Encoding.ASCII.GetBytes("307 Temporary Redirect");
31+
private static readonly byte[] _bytesStatus308 = Encoding.ASCII.GetBytes("308 Permanent Redirect");
3132
private static readonly byte[] _bytesStatus400 = Encoding.ASCII.GetBytes("400 Bad Request");
3233
private static readonly byte[] _bytesStatus401 = Encoding.ASCII.GetBytes("401 Unauthorized");
3334
private static readonly byte[] _bytesStatus402 = Encoding.ASCII.GetBytes("402 Payment Required");
@@ -107,6 +108,8 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null)
107108
return _bytesStatus306;
108109
case 307:
109110
return _bytesStatus307;
111+
case 308:
112+
return _bytesStatus308;
110113
case 400:
111114
return _bytesStatus400;
112115
case 401:
@@ -178,4 +181,4 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null)
178181
return Encoding.ASCII.GetBytes(statusCode.ToString(CultureInfo.InvariantCulture) + " " + reasonPhrase);
179182
}
180183
}
181-
}
184+
}

0 commit comments

Comments
 (0)