summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstelar7 <dudedbz@gmail.com>2020-06-21 04:55:41 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-21 10:00:57 +0200
commitdfe5b232f4b606fb690151acb37afed698678684 (patch)
treeaa897cff5b33187aabb16204cfa45418453cf188
parenta4fbc78f25590e068a61ad69d23ad9fa61c9509b (diff)
downloadserenity-dfe5b232f4b606fb690151acb37afed698678684.zip
LibWeb: Assume URLs ending in / serve html content :^)
-rw-r--r--Libraries/LibWeb/Loader/Resource.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Loader/Resource.cpp b/Libraries/LibWeb/Loader/Resource.cpp
index df7c32f185..f4fe30ce4a 100644
--- a/Libraries/LibWeb/Loader/Resource.cpp
+++ b/Libraries/LibWeb/Loader/Resource.cpp
@@ -87,6 +87,8 @@ static String guess_mime_type_based_on_filename(const URL& url)
return "text/markdown";
if (url.path().ends_with(".html") || url.path().ends_with(".htm"))
return "text/html";
+ if (url.path().ends_with("/"))
+ return "text/html";
return "text/plain";
}