浏览代码

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

Hüseyin ASLITÜRK 5 年之前
父节点
当前提交
0f7a651
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Libraries/LibWeb/Loader/Resource.cpp

+ 3 - 1
Libraries/LibWeb/Loader/Resource.cpp

@@ -88,7 +88,9 @@ static String guess_mime_type_based_on_filename(const URL& url)
     String lowercase_url = url.path().to_lowercase();
     if (lowercase_url.ends_with(".pbm"))
         return "image/x‑portable‑bitmap";
-    if (lowercase_url.ends_with(".png"))
+    if (url.path().ends_with(".pgm"))
+        return "image/x‑portable‑graymap";
+    if (url.path().ends_with(".png"))
         return "image/png";
     if (lowercase_url.ends_with(".ppm"))
         return "image/x‑portable‑pixmap";