Skip to content

Commit

Permalink
refactor res.redirect() relative check
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 21, 2012
1 parent 5db3d0f commit 362c96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Expand Up @@ -569,7 +569,7 @@ res.redirect = function(url){
var path = app.path();

// relative to path
if (0 == url.indexOf('./') || 0 == url.indexOf('..')) {
if ('.' == url[0]) {
url = req.path + '/' + url;
// relative to mount-point
} else if ('/' != url[0]) {
Expand Down

0 comments on commit 362c96c

Please sign in to comment.