From 3fb17e6fec14a0a6035304a2b6681106a902fccb Mon Sep 17 00:00:00 2001 From: Mutzi Date: Mon, 23 Oct 2023 14:00:14 +0200 Subject: [PATCH] Fix #63 --- src/server/server_internal.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/server_internal.hxx b/src/server/server_internal.hxx index 7eed566..f07b965 100644 --- a/src/server/server_internal.hxx +++ b/src/server/server_internal.hxx @@ -58,7 +58,9 @@ static const std::unordered_map mime_type_map = { static const std::string& get_mime_type(const std::filesystem::path &filename) { static const std::string octet = "application/octet-stream"; - const auto &entry = mime_type_map.find(filename.extension()); + std::string ext = filename.extension(); + std::transform(ext.begin(), ext.end(), ext.begin(), [](auto c) { return std::tolower(c); }); + const auto &entry = mime_type_map.find(ext); if (entry != mime_type_map.end()) return entry->second; else