Fix #63
This commit is contained in:
		@@ -58,7 +58,9 @@ static const std::unordered_map<std::string, std::string> 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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user