-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add --preferred-encoding (gzip|brotli)
to use when tile is not pre-encoded by source
#1189
Conversation
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.
good first step, left a few comments
--preferred-encoding (gzip|brotli)
to use when tile is not pre-encoded by source
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.
love it! One small nit, and seems it is pretty good to go!
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.
nah, not worth it, will fix naming if needed later, good enough. I made a few more minor suggestions
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.
I'm not too happy with the description, but can't think think too clearly. Will try in the morning. In the mean time, there is one line that i think was left by an accident, but good to go otherwise, so remove it and feel free to merge :)
martin/src/srv/tiles.rs
Outdated
// only apply compression if the content supports it | ||
if let Some(HeaderEnc::Known(enc)) = | ||
accept_enc.negotiate(SUPPORTED_ENCODINGS.iter()) | ||
// accept_enc.negotiate(SUPPORTED_ENCODINGS.iter()) |
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.
// accept_enc.negotiate(SUPPORTED_ENCODINGS.iter()) |
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.
Oops. Deleted.
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.
"Preferred tile encoding when martin is negotiating with browser, only works if the tile itself is not pre-compressed. The default Brotli is much smaller(and may be faster with caching) but a little bit slower than gzip."
Well this version maybe much worse..
Try to fix #1178
--preferred-encoding
to cli,br
brotli
andgzip
are allowedpreferred-encoding
to config,br
brotli
andgzip
are allowed