From 070ca8f3e0fc1e6e6844fe67b8483ea2c620d183 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sun, 28 Jun 2026 12:35:02 +0200 Subject: [PATCH] chore: bump version to 0.3.60 and handle webmanifest MIME types Update PMOMusic/Cargo.toml and version.txt from 0.3.59 to 0.3.60. Add explicit application/manifest+json detection for .webmanifest files in serve_embed.rs to compensate for mime_guess limitations, converting the MIME value to an owned String and updating the CONTENT_TYPE header reference accordingly. --- PMOMusic/Cargo.toml | 2 +- pmoserver/src/serve_embed.rs | 11 +++++++++-- version.txt | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/PMOMusic/Cargo.toml b/PMOMusic/Cargo.toml index 2f0857d6..119c1e8f 100644 --- a/PMOMusic/Cargo.toml +++ b/PMOMusic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "PMOMusic" -version = "0.3.59" +version = "0.3.60" edition = "2024" [dependencies] diff --git a/pmoserver/src/serve_embed.rs b/pmoserver/src/serve_embed.rs index 95fb2d30..21e2d2c3 100644 --- a/pmoserver/src/serve_embed.rs +++ b/pmoserver/src/serve_embed.rs @@ -50,10 +50,17 @@ impl ServeEmbed { for candidate in candidates { if let Some(content) = E::get(candidate) { - let mime = mime_guess::from_path(candidate).first_or_octet_stream(); + // mime_guess ne connaît pas .webmanifest (trop récent) + let mime = if candidate.ends_with(".webmanifest") { + "application/manifest+json".to_string() + } else { + mime_guess::from_path(candidate) + .first_or_octet_stream() + .to_string() + }; return Some( ( - [(header::CONTENT_TYPE, mime.as_ref())], + [(header::CONTENT_TYPE, mime.as_str())], content.data.into_owned(), ) .into_response(), diff --git a/version.txt b/version.txt index a6d5224c..755765fe 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.3.59 +0.3.60 -- 2.49.1