send content-type, last-modified, etag headers w/ grids, not just tiles
This commit is contained in:
+6
-2
@@ -229,8 +229,12 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
return callback(new Error('Grid is invalid'));
|
return callback(new Error('Grid is invalid'));
|
||||||
}
|
}
|
||||||
|
var options = {
|
||||||
callback(null, result);
|
'Content-Type': 'text/javascript',
|
||||||
|
'Last-Modified': new Date(that._stat.mtime).toUTCString(),
|
||||||
|
'ETag': that._stat.size + '-' + Number(that._stat.mtime)
|
||||||
|
};
|
||||||
|
callback(null, result, options);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user