Skip to content

Commit

Permalink
http: use official IANA Status Codes
Browse files Browse the repository at this point in the history
* adds missing HTTP status codes
* corrects those with a wrong description
* the falsely included codes have been kept

PR-URL: #1470
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
jomo authored and rvagg committed Aug 4, 2015
1 parent ef65321 commit 2d9456e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ const STATUS_CODES = exports.STATUS_CODES = {
205 : 'Reset Content',
206 : 'Partial Content',
207 : 'Multi-Status', // RFC 4918
208 : 'Already Reported',
226 : 'IM Used',
300 : 'Multiple Choices',
301 : 'Moved Permanently',
302 : 'Moved Temporarily',
302 : 'Found',
303 : 'See Other',
304 : 'Not Modified',
305 : 'Use Proxy',
Expand All @@ -43,17 +45,18 @@ const STATUS_CODES = exports.STATUS_CODES = {
405 : 'Method Not Allowed',
406 : 'Not Acceptable',
407 : 'Proxy Authentication Required',
408 : 'Request Time-out',
408 : 'Request Timeout',
409 : 'Conflict',
410 : 'Gone',
411 : 'Length Required',
412 : 'Precondition Failed',
413 : 'Request Entity Too Large',
414 : 'Request-URI Too Large',
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', // RFC 2324
421 : 'Misdirected Request',
422 : 'Unprocessable Entity', // RFC 4918
423 : 'Locked', // RFC 4918
424 : 'Failed Dependency', // RFC 4918
Expand All @@ -66,10 +69,11 @@ const STATUS_CODES = exports.STATUS_CODES = {
501 : 'Not Implemented',
502 : 'Bad Gateway',
503 : 'Service Unavailable',
504 : 'Gateway Time-out',
504 : 'Gateway Timeout',
505 : 'HTTP Version Not Supported',
506 : 'Variant Also Negotiates', // RFC 2295
507 : 'Insufficient Storage', // RFC 4918
508 : 'Loop Detected',
509 : 'Bandwidth Limit Exceeded',
510 : 'Not Extended', // RFC 2774
511 : 'Network Authentication Required' // RFC 6585
Expand Down

0 comments on commit 2d9456e

Please sign in to comment.