Do not use headers from abaculus in combination with sendWithHeaders

This commit is contained in:
Raul Ochoa 2015-04-28 16:14:03 +02:00
parent 6843692f01
commit fde680450f

View File

@ -29,6 +29,8 @@ NamedStaticMapsController.prototype.named = function(req, res) {
this.app.doCORS(res);
var cdbUser = cdbRequest.userByReq(req);
var format = req.params.format === 'jpg' ? 'jpeg' : 'png';
var template;
var layergroupConfig;
var layergroupId;
@ -186,7 +188,8 @@ NamedStaticMapsController.prototype.named = function(req, res) {
}
self.app.sendError(res, err, self.app.findStatusCode(err), 'STATIC_VIZ_MAP', err);
} else {
self.app.sendWithHeaders(res, image, 200, headers);
res.setHeader('Content-Type', headers['Content-Type'] || 'image/' + format);
self.app.sendResponse(res, [image, 200]);
}
}
);