mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibCore+WebServer+LibWeb: Make MIME type guesser take a StringView
This reverts my previous commit in WebServer and fixes the whole issue in a much better way. Instead of having the MIME type guesser take a URL (which we don't actually have in the WebServer at that point), just take a path as a StringView. Also, make use of the case-insensitive StringView::ends_with() :^)
This commit is contained in:
parent
9c14e2ea5d
commit
5043c4a3e5
4 changed files with 15 additions and 25 deletions
|
@ -61,6 +61,6 @@ private:
|
|||
HashMap<String, ByteBuffer> m_data;
|
||||
};
|
||||
|
||||
String guess_mime_type_based_on_filename(const URL&);
|
||||
String guess_mime_type_based_on_filename(const StringView&);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue