summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/padurlsanitize.js
diff options
context:
space:
mode:
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