Browse Source

http: use official IANA Status Codes

* adds missing HTTP status codes
* corrects those with a wrong description
* the falsely included codes have been kept

PR-URL: https://github.com/nodejs/io.js/pull/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>
v4.0.0-rc
jomo 10 years ago
committed by Rod Vagg
parent
commit
2d9456e3e6
  1. 16
      lib/_http_server.js

16
lib/_http_server.js

@ -27,9 +27,11 @@ const STATUS_CODES = exports.STATUS_CODES = {
205 : 'Reset Content', 205 : 'Reset Content',
206 : 'Partial Content', 206 : 'Partial Content',
207 : 'Multi-Status', // RFC 4918 207 : 'Multi-Status', // RFC 4918
208 : 'Already Reported',
226 : 'IM Used',
300 : 'Multiple Choices', 300 : 'Multiple Choices',
301 : 'Moved Permanently', 301 : 'Moved Permanently',
302 : 'Moved Temporarily', 302 : 'Found',
303 : 'See Other', 303 : 'See Other',
304 : 'Not Modified', 304 : 'Not Modified',
305 : 'Use Proxy', 305 : 'Use Proxy',
@ -43,17 +45,18 @@ const STATUS_CODES = exports.STATUS_CODES = {
405 : 'Method Not Allowed', 405 : 'Method Not Allowed',
406 : 'Not Acceptable', 406 : 'Not Acceptable',
407 : 'Proxy Authentication Required', 407 : 'Proxy Authentication Required',
408 : 'Request Time-out', 408 : 'Request Timeout',
409 : 'Conflict', 409 : 'Conflict',
410 : 'Gone', 410 : 'Gone',
411 : 'Length Required', 411 : 'Length Required',
412 : 'Precondition Failed', 412 : 'Precondition Failed',
413 : 'Request Entity Too Large', 413 : 'Payload Too Large',
414 : 'Request-URI Too Large', 414 : 'URI Too Long',
415 : 'Unsupported Media Type', 415 : 'Unsupported Media Type',
416 : 'Requested Range Not Satisfiable', 416 : 'Range Not Satisfiable',
417 : 'Expectation Failed', 417 : 'Expectation Failed',
418 : 'I\'m a teapot', // RFC 2324 418 : 'I\'m a teapot', // RFC 2324
421 : 'Misdirected Request',
422 : 'Unprocessable Entity', // RFC 4918 422 : 'Unprocessable Entity', // RFC 4918
423 : 'Locked', // RFC 4918 423 : 'Locked', // RFC 4918
424 : 'Failed Dependency', // RFC 4918 424 : 'Failed Dependency', // RFC 4918
@ -66,10 +69,11 @@ const STATUS_CODES = exports.STATUS_CODES = {
501 : 'Not Implemented', 501 : 'Not Implemented',
502 : 'Bad Gateway', 502 : 'Bad Gateway',
503 : 'Service Unavailable', 503 : 'Service Unavailable',
504 : 'Gateway Time-out', 504 : 'Gateway Timeout',
505 : 'HTTP Version Not Supported', 505 : 'HTTP Version Not Supported',
506 : 'Variant Also Negotiates', // RFC 2295 506 : 'Variant Also Negotiates', // RFC 2295
507 : 'Insufficient Storage', // RFC 4918 507 : 'Insufficient Storage', // RFC 4918
508 : 'Loop Detected',
509 : 'Bandwidth Limit Exceeded', 509 : 'Bandwidth Limit Exceeded',
510 : 'Not Extended', // RFC 2774 510 : 'Not Extended', // RFC 2774
511 : 'Network Authentication Required' // RFC 6585 511 : 'Network Authentication Required' // RFC 6585

Loading…
Cancel
Save