summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/padurlsanitize.js
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-09-22 13:51:39 +0200
committerMarcel Klehr <mklehr@gmx.net>2012-09-22 13:51:39 +0200
commit71579d14783aa0f020664353f6596142dddfb069 (patch)
tree507a1fcbf320ddd31e6477435b6eace67a6eb4fb /src/node/hooks/express/padurlsanitize.js
parentff7cf991c9f6bb6b7d1c9f9d1bd0963050170bb8 (diff)
downloadetherpad-lite-71579d14783aa0f020664353f6596142dddfb069.zip
Fix res.send (migrate to express v3)
Diffstat (limited to 'src/node/hooks/express/padurlsanitize.js')
-rw-r--r--src/node/hooks/express/padurlsanitize.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/hooks/express/padurlsanitize.js b/src/node/hooks/express/padurlsanitize.js
index 24ec2c3d..29782b69 100644
--- a/src/node/hooks/express/padurlsanitize.js
+++ b/src/node/hooks/express/padurlsanitize.js
@@ -7,7 +7,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//ensure the padname is valid and the url doesn't end with a /
if(!padManager.isValidPadId(padId) || /\/$/.test(req.url))
{
- res.send('Such a padname is forbidden', 404);
+ res.send(404, 'Such a padname is forbidden');
}
else
{
@@ -19,7 +19,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
var query = url.parse(req.url).query;
if ( query ) real_url += '?' + query;
res.header('Location', real_url);
- res.send('You should be redirected to <a href="' + real_url + '">' + real_url + '</a>', 302);
+ res.send(302, 'You should be redirected to <a href="' + real_url + '">' + real_url + '</a>');
}
//the pad id was fine, so just render it
else