Skip to content
Myr

Fixed redirect()

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

authored by visionmedia · committed by visionmedia · parent 52241a1 · Browse files · 1 file+2 added−4 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+2 added−4 removed

  • other:+2 added−4 removed

1 file+2 added−4 removed

modified:lib/express.core.js+2 added-4 removed
176 unmodified lines
177 * @api public178 */179 180 redirect : function(url) {181 // TODO: respond / redirect should halt181 this.header('Location', url)183 this.respond('Moved Temporarily')182 this.respond("Page or file has moved to `" + url + "'", 'Moved Temporarily')183 },184 185 /**186 * Set response status to _value_. Where value may be
5 unmodified lines
192 * @api public193 */194 195 status : function(value) {197 if (value == undefined) throw 'Express.status(): value must be passed'196 if (value == undefined) return197 if (typeof value == 'number') return this.response.status = value198 for (var code in node.http.STATUS_CODES)199 if (node.http.STATUS_CODES.hasOwnProperty(code))200 if (node.http.STATUS_CODES[code].toLowerCase() == value.toLowerCase())
352 unmodified lines
553 554})()555556use('response', Express.Logger)558use('response', Express.ShowExceptions)557558get('user/:name/:operation', function(){559 p(request.headers['User-Agent'])560 p(request.headers['Accept'])
36 unmodified lines