Skip to content
Myr

STATUS_CODES -> responseCodes

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

authored by visionmedia · committed by visionmedia · parent 27b6acb · Browse files · 1 file+45 added−45 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+45 added−45 removed

  • other:+45 added−45 removed

1 file+45 added−45 removed

modified:lib/express.core.js+45 added-45 removed
3 unmodified lines
4process.mixin(GLOBAL, require("sys"))5var http = require("http")67Express = { 8 version : '0.0.1',9 utilities : {},10 modules : [],11 routes : [],12 STATUS_CODES : {13 100 : 'Continue',14 101 : 'Switching Protocols',15 200 : 'OK',16 201 : 'Created',17 202 : 'Accepted',18 203 : 'Non-Authoritative Information',19 204 : 'No Content',20 205 : 'Reset Content',21 206 : 'Partial Content',22 300 : 'Multiple Choices',23 301 : 'Moved Permanently',24 302 : 'Moved Temporarily',25 303 : 'See Other',26 304 : 'Not Modified',27 305 : 'Use Proxy',28 400 : 'Bad Request',29 401 : 'Unauthorized',30 402 : 'Payment Required',31 403 : 'Forbidden',32 404 : 'Not Found',33 405 : 'Method Not Allowed',34 406 : 'Not Acceptable',35 407 : 'Proxy Authentication Required',36 408 : 'Request Time-out',37 409 : 'Conflict',38 410 : 'Gone',39 411 : 'Length Required',40 412 : 'Precondition Failed',41 413 : 'Request Entity Too Large',42 414 : 'Request-URI Too Large',43 415 : 'Unsupported Media Type',44 500 : 'Internal Server Error',45 501 : 'Not Implemented',46 502 : 'Bad Gateway',47 503 : 'Service Unavailable',48 504 : 'Gateway Time-out',49 505 : 'HTTP Version not supported'8 version: '0.0.1',9 utilities: {},10 modules: [],11 routes: [],12 responseCodes : {13 100: 'Continue',14 101: 'Switching Protocols',15 200: 'OK',16 201: 'Created',17 202: 'Accepted',18 203: 'Non-Authoritative Information',19 204: 'No Content',20 205: 'Reset Content',21 206: 'Partial Content',22 300: 'Multiple Choices',23 301: 'Moved Permanently',24 302: 'Moved Temporarily',25 303: 'See Other',26 304: 'Not Modified',27 305: 'Use Proxy',28 400: 'Bad Request',29 401: 'Unauthorized',30 402: 'Payment Required',31 403: 'Forbidden',32 404: 'Not Found',33 405: 'Method Not Allowed',34 406: 'Not Acceptable',35 407: 'Proxy Authentication Required',36 408: 'Request Time-out',37 409: 'Conflict',38 410: 'Gone',39 411: 'Length Required',40 412: 'Precondition Failed',41 413: 'Request Entity Too Large',42 414: 'Request-URI Too Large',43 415: 'Unsupported Media Type',44 500: 'Internal Server Error',45 501: 'Not Implemented',46 502: 'Bad Gateway',47 503: 'Service Unavailable',48 504: 'Gateway Time-out',49 505: 'HTTP Version not supported'50 },51 52 // --- Halt53 54 Halt : function(){54 Halt: function(){55 this.toString = function() {56 return 'Express.Halt'57 }58 },
275 unmodified lines
334 335 status : function(value) {336 if (value == undefined) return337 if (typeof value == 'number') return this.response.status = value338 for (var code in this.STATUS_CODES)339 if (this.STATUS_CODES[code].toLowerCase() == value.toLowerCase())338 for (var code in this.responseCodes)339 if (this.responseCodes[code].toLowerCase() == value.toLowerCase())340 return this.response.status = parseInt(code)341 },342343 /**
352 unmodified lines