Do not add x-profiler header as it's already added by sendResponse
This commit is contained in:
parent
1bf2809355
commit
84f579f0ec
@ -59,9 +59,6 @@ TemplateMapsController.prototype.create = function(req, res) {
|
|||||||
return { template_id: cdbuser + '@' + tpl_id };
|
return { template_id: cdbuser + '@' + tpl_id };
|
||||||
},
|
},
|
||||||
function finish(err, response){
|
function finish(err, response){
|
||||||
if ( req.profiler ) {
|
|
||||||
res.header('X-Tiler-Profiler', req.profiler.toJSONString());
|
|
||||||
}
|
|
||||||
if (err){
|
if (err){
|
||||||
response = { error: ''+err };
|
response = { error: ''+err };
|
||||||
var statusCode = 400;
|
var statusCode = 400;
|
||||||
@ -115,9 +112,6 @@ TemplateMapsController.prototype.update = function(req, res) {
|
|||||||
return { template_id: cdbuser + '@' + tpl_id };
|
return { template_id: cdbuser + '@' + tpl_id };
|
||||||
},
|
},
|
||||||
function finish(err, response){
|
function finish(err, response){
|
||||||
if ( req.profiler ) {
|
|
||||||
res.header('X-Tiler-Profiler', req.profiler.toJSONString());
|
|
||||||
}
|
|
||||||
if (err){
|
if (err){
|
||||||
var statusCode = 400;
|
var statusCode = 400;
|
||||||
response = { error: ''+err };
|
response = { error: ''+err };
|
||||||
@ -304,7 +298,7 @@ TemplateMapsController.prototype.instantiate = function(req, res) {
|
|||||||
}
|
}
|
||||||
self.instantiateTemplate(req, res, req.body, this);
|
self.instantiateTemplate(req, res, req.body, this);
|
||||||
}, function(err, response) {
|
}, 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);
|
self.instantiateTemplate(req, res, config, this);
|
||||||
}, function(err, response) {
|
}, 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) {
|
TemplateMapsController.prototype.finish_instantiation = function(err, response, res) {
|
||||||
if ( req.profiler ) {
|
|
||||||
res.header('X-Tiler-Profiler', req.profiler.toJSONString());
|
|
||||||
}
|
|
||||||
if (err) {
|
if (err) {
|
||||||
var statusCode = 400;
|
var statusCode = 400;
|
||||||
response = { error: ''+err };
|
response = { error: ''+err };
|
||||||
|
Loading…
Reference in New Issue
Block a user