diff --git a/CHANGELOG.md b/CHANGELOG.md index 942b15f..d7b27d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `from_bytes` associated function to `PMTiles`-, `Header`- and `Directory`-struct - Add `from_bytes_partially` associated function to `PMTiles`-struct - Add `find_entry_for_tile_id` method to `Directory`-struct +- Fix the MIME type for Mapbox Vector Tiles (previously `application/x-protobuf`, now `application/vnd.mapbox-vector-tile`) ## [0.2.2] - 2023-10-23 - Tweaks to documentation diff --git a/src/header/tile_type.rs b/src/header/tile_type.rs index e7bf88a..b86778f 100644 --- a/src/header/tile_type.rs +++ b/src/header/tile_type.rs @@ -31,7 +31,7 @@ impl TileType { /// Returns [`None`] if a concrete `Content-Type` could not be determined. pub const fn http_content_type(&self) -> Option<&'static str> { match self { - Self::Mvt => Some("application/x-protobuf"), + Self::Mvt => Some("application/vnd.mapbox-vector-tile"), Self::Png => Some("image/png"), Self::Jpeg => Some("image/jpeg"), Self::WebP => Some("image/webp"), @@ -51,7 +51,7 @@ mod test { assert_eq!( TileType::Mvt.http_content_type(), - Some("application/x-protobuf") + Some("application/vnd.mapbox-vector-tile") ); assert_eq!(TileType::Png.http_content_type(), Some("image/png"));