Skip to content

Commit

Permalink
Update HTTP status codes to IETF RFC 7231 via @tonyta
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Nov 27, 2014
1 parent f326d5b commit 257459e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions lib/lotus/http/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ class Status
ALL = ::Rack::Utils::HTTP_STATUS_CODES.dup.merge({
103 => 'Checkpoint',
122 => 'Request-URI too long',
413 => 'Payload Too Large', # Rack 1.5 compat
414 => 'URI Too Long', # Rack 1.5 compat
416 => 'Range Not Satisfiable', # Rack 1.5 compat
418 => 'I\'m a teapot',
420 => 'Enhance Your Calm',
444 => 'No Response',
449 => 'Retry With',
450 => 'Blocked by Windows Parental Controls',
451 => 'Wrong Exchange server',
499 => 'Client Closed Request',
506 => 'Variant Also Negotiates', # Rack 1.5 compat
598 => 'Network read timeout error',
599 => 'Network connect timeout error'
}).freeze
Expand Down
10 changes: 4 additions & 6 deletions test/fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
306 => 'Reserved',
307 => 'Temporary Redirect',
308 => 'Permanent Redirect',
400 => 'Bad Request',
Expand All @@ -36,10 +35,10 @@
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
413 => 'Payload Too Large',
414 => 'URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
416 => 'Range Not Satisfiable',
417 => 'Expectation Failed',
418 => 'I\'m a teapot',
420 => 'Enhance Your Calm',
Expand All @@ -61,10 +60,9 @@
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
506 => 'Variant Also Negotiates (Experimental)',
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
508 => 'Loop Detected',
509 => 'Unassigned',
510 => 'Not Extended',
511 => 'Network Authentication Required',
598 => 'Network read timeout error',
Expand Down

0 comments on commit 257459e

Please sign in to comment.