--------------------------------------------------------- --- HTTP Error library for ZD --------------------------------------------------------- local error = {} error[100] = "Continue" error[101] = "Switching Protocols" error[102] = "Processing" error[200] = "OK" error[201] = "Created" error[202] = "Accepted" error[203] = "Non-Authoritative Information" error[204] = "No Content" error[205] = "Reset Content" error[206] = "Partial Conent" error[207] = "Multi-Status" error[208] = "Already Reported" error[226] = "IM Used" error[300] = "Multiple Choices" error[301] = "Moved Permanently" error[302] = "Found" error[303] = "See Other" error[304] = "Not Modified" error[305] = "Use Proxy" error[306] = "(Switch Proxy)" error[307] = "Temporary Redirect" error[308] = "Permanent Redirect" error[400] = "Bad Request" error[401] = "Unauthorized" error[402] = "Payment Required" error[403] = "Forbidden" error[404] = "Not Found" error[405] = "Method Not Allowed" error[406] = "Not Acceptable" error[407] = "Proxy Authentication Required" error[408] = "Request Time-out" error[409] = "Conflict" error[410] = "Gone" error[411] = "Length Required" error[412] = "Precondition Failed" error[413] = "Request Entity Too Large" error[414] = "Request-URL Too Long" error[415] = "Unsupported Media Type" error[416] = "Requested range not satisfiable" error[417] = "Expectation Failed" error[418] = "I'm a teapot" error[420] = "Blaze it" error[421] = "There are too many connections from your internet address" error[422] = "Unprocessable Entity" error[423] = "Locked" error[424] = "Failed Dependency" error[425] = "Unordered Collection" error[426] = "Upgrade Required" error[427] = "Precondition Required" error[428] = "Too Many Requests" error[431] = "Request Header Fields Too Large" error[500] = "Internal Server Error" error[501] = "Not Implemented" error[502] = "Bad Gateway" error[503] = "Service Unavailable" error[504] = "Gateway Time-out" error[505] = "HTTP Version not supported" error[506] = "Variant also Negotiates" error[507] = "Insufficient Storage" error[508] = "Loop Detected" error[509] = "Bandwidth Limit Exceeded" error[510] = "Not Extended" error[700] = "Error getting error" error[701] = "Meh" error[702] = "Emacs" error[703] = "Explosion" error[704] = "Goto Fail" error[705] = "I wrote the code and missed the necessary validation by an oversight" error[710] = "PHP" error[711] = "Convenience Store" error[712] = "NoSQL" error[713] = "I am not a teapot" error[720] = "Unpossible" error[721] = "Known Unknowns" error[722] = "Unknown Unknowns" error[723] = "Tricky" error[724] = "This line should be unreachable" error[725] = "It works on my machine" error[726] = "It's a feature, not a bug" error[727] = "32 bits is plenty" error[731] = "Fucking Rubygems" error[732] = "Fucking UnicF;de" error[733] = "Fucking Deadlocks" error[734] = "Fucking Deferreds" error[735] = "Fucking IE" error[736] = "Fucking Race Conditions" error[737] = "FuckThreadsing" error[738] = "Fucking Bundler" error[739] = "Fucking Windows" error[740] = "Computer says no" error[741] = "Compiling" error[742] = "A kitten dies" error[743] = "I thought I knew regular expressions" error[744] = "Y U NO write integration tests?" error[745] = "I don't always test my code, but when I do I do it in production" error[746] = "Missed Ballmer Peak" error[747] = "Motherfucking Snakes on the Motherfucking Plane" error[748] = "Confounded by Ponies" error[749] = "Reserved for Chuck Norris" error[750] = "Didn't bother to compile it" error[753] = "Syntax Error" error[754] = "Too many semi-colons" error[755] = "Not enough semi-colons" error[756] = "Insufficiently polite" error[757] = "Excessively polite" error[759] = "Unexpected T_PAAMAYIM_NEKUDATAYIM" error[761] = "Hungover" error[762] = "Stoned" error[763] = "Under-Caffeinated" error[764] = "Over-Caffeinated" error[765] = "Railscamp" error[766] = "Sober" error[767] = "Drunk" error[768] = "Accidentally Took Sleeping Pills Instead Of Migraine Pills During Crunch Week" error[769] = "Questionable Maturity Level" error[771] = "Cached for too long" error[772] = "Not cached long enough" error[773] = "Not cached at all" error[774] = "Why was this cached?" error[776] = "Error on the Exception" error[777] = "Coincidence" error[778] = "Off By One Error" error[779] = "Off By Too Many To Count Error" error[780] = "Project owner not responding" error[781] = "Operations" error[782] = "QA" error[783] = "It was a customer request, honestly" error[784] = "Management, obviously" error[785] = "TPS Cover Sheet not attached" error[786] = "Try it now" error[787] = "Further Funding Required" error[791] = "The Internet shut down due to copyright restrictions" error[792] = "Climate change driven catastrophic weather event" error[793] = "Zombie Apocalypse" error[794] = "Someone let PG near a REPL" error[795] = "#heartbleed" error[797] = "This is the last page of the Internet. Go back" error[799] = "End of the world" return function(ZD) ZD.httpError = function(code) return error[code] or error[700] end ZD.htmlError = function(code, full) if not error[code] then code = 700 end local description = ZD.httpError(code) local html = "Error " .. tostring(code) .. " - " .. description .. [[