Fix res.send (migrate to express v3)

This commit is contained in:
Marcel Klehr 2012-09-22 13:51:39 +02:00
parent ff7cf991c9
commit 71579d1478
5 changed files with 8 additions and 12 deletions

View file

@ -56,10 +56,10 @@ exports.basicAuth = function (req, res, next) {
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');
if (req.headers.authorization) {
setTimeout(function () {
res.send('Authentication required', 401);
res.send(401, 'Authentication required');
}, 1000);
} else {
res.send('Authentication required', 401);
res.send(401, 'Authentication required');
}
}));
}