tileserver-gl-light 5.4.0-pre.2 → 5.4.1-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/package.json +1 -1
- package/src/serve_rendered.js +24 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# tileserver-gl changelog
|
|
2
2
|
|
|
3
|
-
## 5.4.
|
|
3
|
+
## 5.4.1-pre.0
|
|
4
|
+
* This release is only to test the new release workflow (https://github.com/maptiler/tileserver-gl/pull/1685)
|
|
5
|
+
|
|
6
|
+
## 5.4.0
|
|
4
7
|
* Fix the issue where the tile URL cannot be correctly parsed with the HTTPS protocol when using an nginx proxy service (https://github.com/maptiler/tileserver-gl/pull/1578) by @dakanggo
|
|
5
8
|
* Use jemalloc as memory allocator in the docker image (https://github.com/maptiler/tileserver-gl/pull/1574) by @MichielMortier
|
|
6
9
|
* Rasters: Add tileSize to TileJSON (https://github.com/maptiler/tileserver-gl/pull/1559) by @roblabs
|
package/package.json
CHANGED
package/src/serve_rendered.js
CHANGED
|
@@ -1202,10 +1202,30 @@ export const serve_rendered = {
|
|
|
1202
1202
|
parsedResponse.data = responseData;
|
|
1203
1203
|
callback(null, parsedResponse);
|
|
1204
1204
|
} catch (error) {
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1205
|
+
if (error.response && error.response.status === 410) {
|
|
1206
|
+
// This is the 410 "Gone" error, treat as sparse
|
|
1207
|
+
if (verbose) {
|
|
1208
|
+
console.log(
|
|
1209
|
+
'fetchTile warning on %s, sparse response due to 410 Gone',
|
|
1210
|
+
req.url,
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
callback();
|
|
1214
|
+
} else {
|
|
1215
|
+
// For all other errors (e.g., network errors, 404, 500, etc.) return empty content.
|
|
1216
|
+
console.error(
|
|
1217
|
+
`Error fetching remote URL ${req.url}:`,
|
|
1218
|
+
error.message || error,
|
|
1219
|
+
error.response
|
|
1220
|
+
? `Status: ${error.response.status}`
|
|
1221
|
+
: 'No response received',
|
|
1222
|
+
);
|
|
1223
|
+
|
|
1224
|
+
const parts = url.parse(req.url);
|
|
1225
|
+
const extension = path.extname(parts.pathname).toLowerCase();
|
|
1226
|
+
const format = extensionToFormat[extension] || '';
|
|
1227
|
+
createEmptyResponse(format, '', callback);
|
|
1228
|
+
}
|
|
1209
1229
|
}
|
|
1210
1230
|
} else if (protocol === 'file') {
|
|
1211
1231
|
const name = decodeURI(req.url).substring(protocol.length + 3);
|