Skip to content

Commit 8869fd3

Browse files
authored
Merge pull request #79 from mlipok/GetReasonPhrase()
GetReasonPhrase() - suplemented
2 parents 34cd032 + 235476d commit 8869fd3

File tree

1 file changed

+53
-2
lines changed

1 file changed

+53
-2
lines changed

src/WebViewManager.cs

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,23 +2127,71 @@ private string GetReasonPhrase(int statusCode, string originalReason)
21272127
{
21282128
if (!string.IsNullOrEmpty(originalReason)) return originalReason;
21292129

2130-
switch (statusCode)
2130+
/// StatusCode meaning
2131+
switch (statusCode)
21312132
{
2133+
case 100: return "Continue";
2134+
case 101: return "Switching protocols";
2135+
case 102: return "Processing";
2136+
case 103: return "Early Hints";
21322137
case 200: return "OK";
21332138
case 201: return "Created";
2139+
case 202: return "Accepted";
21342140
case 204: return "No Content";
2141+
case 205: return "Reset Content";
2142+
case 206: return "Partial Content";
2143+
case 207: return "Multi-Status";
2144+
case 208: return "Already Reported";
2145+
case 226: return "IM Used";
2146+
case 300: return "Multiple Choices";
21352147
case 301: return "Moved Permanently";
21362148
case 302: return "Found";
2149+
case 303: return "See Other";
21372150
case 304: return "Not Modified";
2151+
case 305: return "Use Proxy";
2152+
case 306: return "Switch Proxy";
2153+
case 307: return "Temporary Redirect";
2154+
case 308: return "Permanent Redirect";
21382155
case 400: return "Bad Request";
21392156
case 401: return "Unauthorized";
2157+
case 402: return "Payment Required";
21402158
case 403: return "Forbidden";
21412159
case 404: return "Not Found";
2160+
case 405: return "Method Not Allowed";
2161+
case 406: return "Not Acceptable";
2162+
case 407: return "Proxy Authentication Required";
2163+
case 408: return "Request Timeout";
2164+
case 409: return "Conflict";
2165+
case 410: return "Gone";
2166+
case 411: return "Length Required";
2167+
case 412: return "Precondition Failed";
2168+
case 413: return "Payload Too Large";
2169+
case 414: return "URI Too Long";
2170+
case 415: return "Unsupported Media Type";
2171+
case 416: return "Range Not Satisfiable";
2172+
case 417: return "Expectation Failed";
2173+
case 418: return "I'm a Teapot";
2174+
case 421: return "Misdirected Request";
2175+
case 422: return "Unprocessable Entity";
2176+
case 423: return "Locked";
2177+
case 424: return "Failed Dependency";
2178+
case 425: return "Too Early";
2179+
case 426: return "Upgrade Required";
2180+
case 428: return "Precondition Required";
21422181
case 429: return "Too Many Requests";
2182+
case 431: return "Request Header Fields Too Large";
2183+
case 451: return "Unavailable For Legal Reasons";
21432184
case 500: return "Internal Server Error";
2185+
case 501: return "Not Implemented";
21442186
case 502: return "Bad Gateway";
21452187
case 503: return "Service Unavailable";
21462188
case 504: return "Gateway Timeout";
2189+
case 505: return "HTTP Version Not Supported";
2190+
case 506: return "Variant Also Negotiates";
2191+
case 507: return "Insufficient Storage";
2192+
case 508: return "Loop Detected";
2193+
case 510: return "Not Extended";
2194+
case 511: return "Network Authentication Required";
21472195
default:
21482196
try { return ((System.Net.HttpStatusCode)statusCode).ToString(); }
21492197
catch { return "Unknown"; }
@@ -2256,4 +2304,7 @@ private string CleanJsString(string input)
22562304
}
22572305
#endregion
22582306
}
2259-
}
2307+
2308+
}
2309+
2310+

0 commit comments

Comments
 (0)