Skip to content
Myr

Refactored res.redirect()

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 a89767c · Browse files · 1 file+4 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

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:lib/express/response.js+4 added-3 removed
309 unmodified lines
310 // Perform redirect311 url = mapped || url;312313 // Respond314 this.headers['Content-Type'] = 'text/plain';315 this.headers['Location'] = url;316 this.send('Redirecting to ' + url, this.headers, status || 302);314 this.send('Redirecting to ' + url, {315 'Content-Type': 'text/plain',316 'Location': url317 }, status || 302);318};