summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node/hooks/express/adminplugins.js8
-rw-r--r--src/node/hooks/express/padreadonly.js2
-rw-r--r--src/node/hooks/express/padurlsanitize.js4
-rw-r--r--src/node/hooks/express/webaccess.js4
-rw-r--r--src/node/padaccess.js2
5 files changed, 8 insertions, 12 deletions
diff --git a/src/node/hooks/express/adminplugins.js b/src/node/hooks/express/adminplugins.js
index fc274a07..97a0d602 100644
--- a/src/node/hooks/express/adminplugins.js
+++ b/src/node/hooks/express/adminplugins.js
@@ -12,14 +12,10 @@ exports.expressCreateServer = function (hook_name, args, cb) {
errors: [],
};
- res.send(eejs.require(
- "ep_etherpad-lite/templates/admin/plugins.html",
- render_args), {});
+ res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins.html", render_args) );
});
args.app.get('/admin/plugins/info', function(req, res) {
- res.send(eejs.require(
- "ep_etherpad-lite/templates/admin/plugins-info.html",
- {}), {});
+ res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins-info.html", {}) );
});
}
diff --git a/src/node/hooks/express/padreadonly.js b/src/node/hooks/express/padreadonly.js
index 60ece0ad..af5cbed3 100644
--- a/src/node/hooks/express/padreadonly.js
+++ b/src/node/hooks/express/padreadonly.js
@@ -56,7 +56,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
ERR(err);
if(err == "notfound")
- res.send('404 - Not Found', 404);
+ res.send(404, '404 - Not Found');
else
res.send(html);
});
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
diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js
index a6a270c0..99971206 100644
--- a/src/node/hooks/express/webaccess.js
+++ b/src/node/hooks/express/webaccess.js
@@ -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');
}
}));
}
diff --git a/src/node/padaccess.js b/src/node/padaccess.js
index a3d1df33..4388ab94 100644
--- a/src/node/padaccess.js
+++ b/src/node/padaccess.js
@@ -15,7 +15,7 @@ module.exports = function (req, res, callback) {
callback();
//no access
} else {
- res.send("403 - Can't touch this", 403);
+ res.send(403, "403 - Can't touch this");
}
});
}