Skip to content
Myr

Fixed `res.redirect()` HEAD support

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 2c734e2 · Browse files · 1 file+2 added−1 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−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:lib/response.js+2 added-1 removed
405 unmodified lines
406 var app = this.app407 , req = this.req408 , base = app.set('basepath') || app.route409 , status = status || 302410 , head = 'HEAD' == req.method411 , body;412413 // Setup redirect map414 var map = {
34 unmodified lines
449450 // Respond451 this.statusCode = status;452 this.header('Location', url);452 this.end(body);453 this.end(head ? null : body);454};