Skip to content
Myr

Added relative redirect test

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 0653f73 · Browse files · 2 files+23 added−5 removed
This commit

State

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

Diff stats

2 files+23 added−5 removed

  • tests:+19 added−1 removed
  • other:+4 added−4 removed

2 files+23 added−5 removed

modified:lib/response.js+4 added-4 removed
344 unmodified lines
345 *346 * Options:347 *348 * - `maxAge` max-age in milliseconds, converted to `expires`349 * - `path` defaults to the "basepath" setting which is typically "/"349 * - `path` defaults to the "root" setting which is typically "/"350 *351 * Examples:352 *353 * // "Remember Me" for 15 minutes
23 unmodified lines
377 *378 * The given `url` can also be the name of a mapped url, for379 * example by default express supports "back" which redirects380 * to the _Referrer_ or _Referer_ headers or the application's381 * "basepath" setting. Express also supports "basepath" out of the box,382 * which can be set via `app.set('basepath', '/blog');`.381 * "root" setting. Express also supports "root" out of the box,382 * which can be set via `app.set('root', '/blog');`.383 *384 * Examples:385 *386 * res.redirect('/foo/bar');
36 unmodified lines
423424res.redirect = function(url){425 var app = this.app426 , req = this.req427 , base = app.set('basepath') || app.route427 , base = app.get('root') || app.route428 , head = 'HEAD' == req.method429 , status = 302430 , body;431
125 unmodified lines
modified:test/res.redirect.js+19 added-1 removed