Skip to content
Myr

Deprecate res.redirect(url, status)

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 544c666 · Browse files · 2 files+2 added−3 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+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:lib/response.js+1 added-3 removed
705 unmodified lines
706 *707 * res.redirect('/foo/bar');708 * res.redirect('http://example.com');709 * res.redirect(301, 'http://example.com');710 * res.redirect('http://example.com', 301);710 * res.redirect('../login'); // /blog/post/1 -> /blog/login711 *713 * @param {String} url714 * @param {Number} code712 * @api public713 */714715res.redirect = function(url){
6 unmodified lines
722 if ('number' == typeof url) {723 status = url;724 url = arguments[1];725 } else {726 deprecate('res.redirect(ur, status): Use res.redirect(status, url) instead');727 status = arguments[1];728 }729 }730
84 unmodified lines
modified:History.md+1 added
13.x2===34 * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead5 * fix `res.send(status, num)` to send `num` as json (not error)6 * deps: basic-auth@1.0.07 - support empty password8 - support empty username
1521 unmodified lines