Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static class ReasonPhrases
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");
Expand Down Expand Up @@ -153,6 +154,8 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null)
return _bytesStatus424;
case 426:
return _bytesStatus426;
case 451:
return _bytesStatus451;
case 500:
return _bytesStatus500;
case 501:
Expand All @@ -178,4 +181,4 @@ public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null)
return Encoding.ASCII.GetBytes(statusCode.ToString(CultureInfo.InvariantCulture) + " " + reasonPhrase);
}
}
}
}