From dfe5b232f4b606fb690151acb37afed698678684 Mon Sep 17 00:00:00 2001 From: stelar7 Date: Sun, 21 Jun 2020 04:55:41 +0200 Subject: [PATCH] LibWeb: Assume URLs ending in / serve html content :^) --- Libraries/LibWeb/Loader/Resource.cpp | 2 ++ 1 file changed, 2 insertions(+) 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"; }