diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index 3bfad338..27fd8fd9 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -257,8 +257,6 @@ module.exports = function(serverOptions) { ]; app.sendResponse = function(res, args) { - var that = this; - var statusCode; if ( res._windshaftStatusCode ) { // Added by our override of sendError @@ -294,7 +292,7 @@ module.exports = function(serverOptions) { } //console.log("Adding cache channel to route\n" + req.route.path + " not matching any in:\n" + // mapCreateRoutes.join("\n")); - app.addCacheChannel(that, req, this); + app.addCacheChannel(req, this); }, function sendResponse(err/*, added*/) { if ( err ) console.log(err + err.stack); @@ -579,7 +577,7 @@ module.exports = function(serverOptions) { // @param cb function(err, channel) will be called when ready. // the channel parameter will be null if nothing was added // - app.addCacheChannel = function(app, req, cb) { + app.addCacheChannel = function(req, cb) { // skip non-GET requests, or requests for which there's no response if ( req.method != 'GET' || ! req.res ) { cb(null, null); return; } if (req.profiler) {