LibWeb: Assume URLs ending in / serve html content :^)

This commit is contained in:
stelar7 2020-06-21 04:55:41 +02:00 committed by Andreas Kling
parent a4fbc78f25
commit dfe5b232f4
Notes: sideshowbarker 2024-07-19 05:30:25 +09:00

View file

@ -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";
}