-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: resolves Unimplemented type: 3 error for geojson format #1465
base: master
Are you sure you want to change the base?
Conversation
src/serve_data.js
Outdated
@@ -21,6 +21,7 @@ import { openMbTilesWrapper } from './mbtiles_wrapper.js'; | |||
|
|||
import fs from 'node:fs'; | |||
import { fileURLToPath } from 'url'; | |||
import zlib from 'zlib'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is zlib needed here, we are using gunzipP from
import { gunzipP, gzipP } from './promises.js'; , which links that file itslef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I removed the duplicate import
src/serve_data.js
Outdated
data = await gunzipP(data); | ||
isGzipped = false; | ||
} | ||
delete headers['Content-Encoding']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think this delete headers['Content-Encoding'];
line is needed, won't it just be updated to gzip anyway on line 159
headers['Content-Encoding'] = 'gzip';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. updated.
We were stuck receiving the unimplemented type 3 error when updating to version 5.x. Moved the isGzipped condition outside the tileJSONformat condition and removed content-encoding headers resolves the issue.