mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
LibWeb: Assume URLs ending in / serve html content :^)
This commit is contained in:
parent
a4fbc78f25
commit
dfe5b232f4
Notes:
sideshowbarker
2024-07-19 05:30:25 +09:00
Author: https://github.com/stelar7 🔰 Commit: https://github.com/SerenityOS/serenity/commit/dfe5b232f4b Pull-request: https://github.com/SerenityOS/serenity/pull/2602 Issue: https://github.com/SerenityOS/serenity/issues/2601
1 changed files with 2 additions and 0 deletions
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue