Permalink
Browse files

Added extended HTTP status codes to the exceptions class (included wi…

…th the controllers).
  • Loading branch information...
1 parent 7b84fe8 commit 45982c673fe6bb2818633828965bd5f7df2404ba @mtodd committed May 27, 2008
Showing with 17 additions and 1 deletion.
  1. +17 −1 lib/halcyon/exceptions.rb
View
@@ -34,19 +34,22 @@ def initialize(status, body)
HTTP_STATUS_CODES = {
100 => 'Continue',
101 => 'Switching Protocols',
+ 102 => 'Processing',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
+ 207 => 'Multi-Status',
300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Moved Temporarily',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
+ 307 => 'Temporary Redirect',
400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
@@ -63,14 +66,27 @@ def initialize(status, body)
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Large',
415 => 'Unsupported Media Type',
+ 416 => 'Requested Range Not Satisfiable',
+ 417 => 'Expectation Failed',
+ 422 => 'Unprocessable Entity',
+ 423 => 'Locked',
+ 424 => 'Failed Dependency',
+ 425 => 'No Code',
+ 426 => 'Upgrade Required',
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Time-out',
- 505 => 'HTTP Version not supported'
+ 505 => 'HTTP Version not supported',
+ 506 => 'Variant Also Negotiates',
+ 507 => 'Insufficient Storage',
+ 510 => 'Not Extended'
}
+ # Added extended HTTP status codes found from
+ # http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html
+
#--
# Classify Status Codes
#++

0 comments on commit 45982c6

Please sign in to comment.