Skip to content
Myr

Use http STATUS_CODES [#104]

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent a974b8b · Browse files · 1 file+1 added−39 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−39 removed

  • other:+1 added−39 removed

1 file+1 added−39 removed

modified:lib/express/request.js+1 added-39 removed
9 unmodified lines
10/**11 * Default response code bodies.12 */1314var statusBodies = {15 100: 'Continue',16 101: 'Switching Protocols',17 200: 'OK',18 201: 'Created',19 202: 'Accepted',20 203: 'Non-Authoritative Information',21 204: 'No Content',22 205: 'Reset Content',23 206: 'Partial Content',24 300: 'Multiple Choices',25 301: 'Moved Permanently',26 302: 'Moved Temporarily',27 303: 'See Other',28 304: 'Not Modified',29 305: 'Use Proxy',30 400: 'Bad Request',31 401: 'Unauthorized',32 402: 'Payment Required',33 403: 'Forbidden',34 404: 'Not Found',35 405: 'Method Not Allowed',36 406: 'Not Acceptable',37 407: 'Proxy Authentication Required',38 408: 'Request Time-out',39 409: 'Conflict',40 410: 'Gone',41 411: 'Length Required',42 412: 'Precondition Failed',43 413: 'Request Entity Too Large',44 414: 'Request-URI Too Large',45 415: 'Unsupported Media Type',46 500: 'Internal Server Error',47 501: 'Not Implemented',48 502: 'Bad Gateway',49 503: 'Service Unavailable',50 504: 'Gateway Time-out',51 505: 'HTTP Version not supported'52}14var statusBodies = require('http').STATUS_CODES1516// --- InvalidStatusCode1718InvalidStatusCode = ExpressError.extend({
206 unmodified lines