summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorHüseyin ASLITÜRK <asliturk@hotmail.com>2020-06-22 14:50:16 +0300
committerAndreas Kling <kling@serenityos.org>2020-06-27 13:01:27 +0200
commit0f7a651adcdbc35c09f559cb63c3a69cd28f4765 (patch)
tree6acc6f7830d4263a54f25a270cf6658c7af9f577 /Libraries/LibWeb
parenta8b0ad5cc641bf7e7d2dd22a2ac155062ba14a11 (diff)
downloadserenity-0f7a651adcdbc35c09f559cb63c3a69cd28f4765.zip
LibWeb: Add "image/x‑portable‑graymap" mime type for pgm file extension
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Loader/Resource.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Loader/Resource.cpp b/Libraries/LibWeb/Loader/Resource.cpp
index 027e6a5b20..4fd93de1b7 100644
--- a/Libraries/LibWeb/Loader/Resource.cpp
+++ b/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";