LibWeb: Add "image/x‑portable‑graymap" mime type for pgm file extension

This commit is contained in:
Hüseyin ASLITÜRK 2020-06-22 14:50:16 +03:00 committed by Andreas Kling
parent a8b0ad5cc6
commit 0f7a651adc
Notes: sideshowbarker 2024-07-19 05:21:43 +09:00

View file

@ -88,7 +88,9 @@ static String guess_mime_type_based_on_filename(const URL& url)
String lowercase_url = url.path().to_lowercase(); String lowercase_url = url.path().to_lowercase();
if (lowercase_url.ends_with(".pbm")) if (lowercase_url.ends_with(".pbm"))
return "image/xportablebitmap"; return "image/xportablebitmap";
if (lowercase_url.ends_with(".png")) if (url.path().ends_with(".pgm"))
return "image/xportablegraymap";
if (url.path().ends_with(".png"))
return "image/png"; return "image/png";
if (lowercase_url.ends_with(".ppm")) if (lowercase_url.ends_with(".ppm"))
return "image/xportablepixmap"; return "image/xportablepixmap";