Permalink
Browse files

add some missing HTTP status codes

  • Loading branch information...
1 parent 77142a0 commit faef983b36c244ddbbb1ab33ed0ff0bc6594e040 @vinoski vinoski committed Oct 1, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/yaws_api.erl
View
@@ -520,6 +520,7 @@ do_parse_spec(QueryList, Last, Cur, State) when is_list(QueryList) ->
code_to_phrase(100) -> "Continue";
code_to_phrase(101) -> "Switching Protocols ";
+code_to_phrase(102) -> "Processing";
code_to_phrase(200) -> "OK";
code_to_phrase(201) -> "Created";
code_to_phrase(202) -> "Accepted";
@@ -528,6 +529,8 @@ code_to_phrase(204) -> "No Content";
code_to_phrase(205) -> "Reset Content";
code_to_phrase(206) -> "Partial Content";
code_to_phrase(207) -> "Multi Status";
+code_to_phrase(208) -> "Already Reported";
+code_to_phrase(226) -> "IM Used";
code_to_phrase(300) -> "Multiple Choices";
code_to_phrase(301) -> "Moved Permanently";
code_to_phrase(302) -> "Found";
@@ -536,6 +539,7 @@ code_to_phrase(304) -> "Not Modified";
code_to_phrase(305) -> "Use Proxy";
code_to_phrase(306) -> "(Unused)";
code_to_phrase(307) -> "Temporary Redirect";
+code_to_phrase(308) -> "Permanent Redirect";
code_to_phrase(400) -> "Bad Request";
code_to_phrase(401) -> "Unauthorized";
code_to_phrase(402) -> "Payment Required";
@@ -554,6 +558,13 @@ code_to_phrase(414) -> "Request-URI Too Long";
code_to_phrase(415) -> "Unsupported Media Type";
code_to_phrase(416) -> "Requested Range Not Satisfiable";
code_to_phrase(417) -> "Expectation Failed";
+code_to_phrase(418) -> "I'm a teapot";
+code_to_phrase(420) -> "Enhance Your Calm";
+code_to_phrase(422) -> "Unprocessable Entity";
+code_to_phrase(423) -> "Locked";
+code_to_phrase(424) -> "Method Failure";
+code_to_phrase(425) -> "Unordered Collection";
+code_to_phrase(426) -> "Upgrade Required";
code_to_phrase(428) -> "Precondition Required";
code_to_phrase(429) -> "Too Many Requests";
code_to_phrase(431) -> "Request Header Fields Too Large";
@@ -563,6 +574,10 @@ code_to_phrase(502) -> "Bad Gateway";
code_to_phrase(503) -> "Service Unavailable";
code_to_phrase(504) -> "Gateway Timeout";
code_to_phrase(505) -> "HTTP Version Not Supported";
+code_to_phrase(506) -> "Variant Also Negotiates";
+code_to_phrase(507) -> "Insufficient Storage";
+code_to_phrase(508) -> "Loop Detected";
+code_to_phrase(510) -> "Not Extended";
code_to_phrase(511) -> "Network Authentication Required";
%% Below are some non-HTTP status codes from other protocol standards that

0 comments on commit faef983

Please sign in to comment.