From 84f579f0ec830c79bd9dabcf350d84a500b79034 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 14 Apr 2015 16:41:04 +0200 Subject: [PATCH] Do not add x-profiler header as it's already added by sendResponse --- lib/cartodb/controllers/template_maps.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/cartodb/controllers/template_maps.js b/lib/cartodb/controllers/template_maps.js index d9762702..eb3fcb7b 100644 --- a/lib/cartodb/controllers/template_maps.js +++ b/lib/cartodb/controllers/template_maps.js @@ -59,9 +59,6 @@ TemplateMapsController.prototype.create = function(req, res) { return { template_id: cdbuser + '@' + tpl_id }; }, function finish(err, response){ - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } if (err){ response = { error: ''+err }; var statusCode = 400; @@ -115,9 +112,6 @@ TemplateMapsController.prototype.update = function(req, res) { return { template_id: cdbuser + '@' + tpl_id }; }, function finish(err, response){ - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } if (err){ var statusCode = 400; response = { error: ''+err }; @@ -304,7 +298,7 @@ TemplateMapsController.prototype.instantiate = function(req, res) { } self.instantiateTemplate(req, res, req.body, this); }, function(err, response) { - self.finish_instantiation(err, response, res, req); + self.finish_instantiation(err, response, res); } ); }; @@ -339,7 +333,7 @@ TemplateMapsController.prototype.jsonp = function(req, res) { } self.instantiateTemplate(req, res, config, this); }, function(err, response) { - self.finish_instantiation(err, response, res, req); + self.finish_instantiation(err, response, res); } ); }; @@ -446,10 +440,7 @@ TemplateMapsController.prototype.instantiateTemplate = function(req, res, templa ); }; -TemplateMapsController.prototype.finish_instantiation = function(err, response, res, req) { - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } +TemplateMapsController.prototype.finish_instantiation = function(err, response, res) { if (err) { var statusCode = 400; response = { error: ''+err };