1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

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

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