send content-type, last-modified, etag headers w/ grids, not just tiles

This commit is contained in:
Ian Ward
2012-02-06 11:42:04 -05:00
parent 41d42ad32e
commit db5fc04e0d

View File

@@ -229,8 +229,12 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
} catch (err) {
return callback(new Error('Grid is invalid'));
}
callback(null, result);
var options = {
'Content-Type': 'text/javascript',
'Last-Modified': new Date(that._stat.mtime).toUTCString(),
'ETag': that._stat.size + '-' + Number(that._stat.mtime)
};
callback(null, result, options);
}
);
};