Comparison

net/http/codes.lua @ 6694:fc45dc6d604c

net.http.codes: Update from registry
author Kim Alvefur <zash@zash.se>
date Thu, 14 May 2015 20:47:37 +0200
parent 4723:198b11ed196a
child 7571:e8efb5cf0877
comparison
equal deleted inserted replaced
6692:93eefa92527d 6694:fc45dc6d604c
23 [303] = "See Other"; 23 [303] = "See Other";
24 [304] = "Not Modified"; 24 [304] = "Not Modified";
25 [305] = "Use Proxy"; 25 [305] = "Use Proxy";
26 -- The 306 status code was used in a previous version of [RFC2616], is no longer used, and the code is reserved. 26 -- The 306 status code was used in a previous version of [RFC2616], is no longer used, and the code is reserved.
27 [307] = "Temporary Redirect"; 27 [307] = "Temporary Redirect";
28 [308] = "Permanent Redirect";
28 29
29 [400] = "Bad Request"; 30 [400] = "Bad Request";
30 [401] = "Unauthorized"; 31 [401] = "Unauthorized";
31 [402] = "Payment Required"; 32 [402] = "Payment Required";
32 [403] = "Forbidden"; 33 [403] = "Forbidden";
37 [408] = "Request Timeout"; 38 [408] = "Request Timeout";
38 [409] = "Conflict"; 39 [409] = "Conflict";
39 [410] = "Gone"; 40 [410] = "Gone";
40 [411] = "Length Required"; 41 [411] = "Length Required";
41 [412] = "Precondition Failed"; 42 [412] = "Precondition Failed";
42 [413] = "Request Entity Too Large"; 43 [413] = "Payload Too Large";
43 [414] = "Request-URI Too Long"; 44 [414] = "URI Too Long";
44 [415] = "Unsupported Media Type"; 45 [415] = "Unsupported Media Type";
45 [416] = "Requested Range Not Satisfiable"; 46 [416] = "Range Not Satisfiable";
46 [417] = "Expectation Failed"; 47 [417] = "Expectation Failed";
47 [418] = "I'm a teapot"; 48 [418] = "I'm a teapot";
49 [421] = "Misdirected Request";
48 [422] = "Unprocessable Entity"; 50 [422] = "Unprocessable Entity";
49 [423] = "Locked"; 51 [423] = "Locked";
50 [424] = "Failed Dependency"; 52 [424] = "Failed Dependency";
51 -- The 425 status code is reserved for the WebDAV advanced collections expired proposal [RFC2817] 53 -- The 425 status code is reserved for the WebDAV advanced collections expired proposal [RFC2817]
52 [426] = "Upgrade Required"; 54 [426] = "Upgrade Required";
55 [428] = "Precondition Required";
56 [429] = "Too Many Requests";
57 [431] = "Request Header Fields Too Large";
53 58
54 [500] = "Internal Server Error"; 59 [500] = "Internal Server Error";
55 [501] = "Not Implemented"; 60 [501] = "Not Implemented";
56 [502] = "Bad Gateway"; 61 [502] = "Bad Gateway";
57 [503] = "Service Unavailable"; 62 [503] = "Service Unavailable";
59 [505] = "HTTP Version Not Supported"; 64 [505] = "HTTP Version Not Supported";
60 [506] = "Variant Also Negotiates"; -- Experimental 65 [506] = "Variant Also Negotiates"; -- Experimental
61 [507] = "Insufficient Storage"; 66 [507] = "Insufficient Storage";
62 [508] = "Loop Detected"; 67 [508] = "Loop Detected";
63 [510] = "Not Extended"; 68 [510] = "Not Extended";
69 [511] = "Network Authentication Required";
64 }; 70 };
65 71
66 for k,v in pairs(response_codes) do response_codes[k] = k.." "..v; end 72 for k,v in pairs(response_codes) do response_codes[k] = k.." "..v; end
67 return setmetatable(response_codes, { __index = function(t, k) return k.." Unassigned"; end }) 73 return setmetatable(response_codes, { __index = function(t, k) return k.." Unassigned"; end })