(MODE-11365) Minor fixes.
This commit is contained in:
parent
38445cf0fe
commit
7487d11e3d
1 changed files with 3 additions and 3 deletions
|
|
@ -148,7 +148,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
ratio: ratio,
|
ratio: ratio,
|
||||||
request: function(req, callback) {
|
request: function(req, callback) {
|
||||||
var protocol = req.url.split(':')[0];
|
var protocol = req.url.split(':')[0];
|
||||||
//console.log('Handling request:', req);
|
// console.log('Handling request:', req);
|
||||||
if (protocol == 'sprites') {
|
if (protocol == 'sprites') {
|
||||||
var dir = options.paths[protocol];
|
var dir = options.paths[protocol];
|
||||||
var file = unescape(req.url).substring(protocol.length + 3);
|
var file = unescape(req.url).substring(protocol.length + 3);
|
||||||
|
|
@ -177,7 +177,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
format = parts[5].split('.')[1];
|
format = parts[5].split('.')[1];
|
||||||
source.getTile(z, x, y, function(err, data, headers) {
|
source.getTile(z, x, y, function(err, data, headers) {
|
||||||
if (err) {
|
if (err) {
|
||||||
//console.log('MBTiles error, serving empty', err);
|
// console.log('MBTiles error, serving empty', err);
|
||||||
createEmptyResponse(sourceInfo.format, sourceInfo.color, callback);
|
createEmptyResponse(sourceInfo.format, sourceInfo.color, callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -214,7 +214,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
var extension = path.extname(parts.pathname).toLowerCase();
|
var extension = path.extname(parts.pathname).toLowerCase();
|
||||||
var format = extensionToFormat[extension] || '';
|
var format = extensionToFormat[extension] || '';
|
||||||
if (err || res.statusCode < 200 || res.statusCode >= 300) {
|
if (err || res.statusCode < 200 || res.statusCode >= 300) {
|
||||||
//console.log('HTTP error', err || res.statusCode);
|
// console.log('HTTP error', err || res.statusCode);
|
||||||
createEmptyResponse(format, '', callback);
|
createEmptyResponse(format, '', callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue