LibURL+LibWeb: Remove leading slash when converting url to path

...on Windows
This commit is contained in:
stasoid 2025-02-14 15:31:43 +05:00 committed by Andrew Kaster
parent 5ff32fb090
commit 32ddeb82d6
Notes: github-actions[bot] 2025-04-11 01:05:22 +00:00
5 changed files with 18 additions and 5 deletions

View file

@ -102,7 +102,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HTTP::HeaderM
if (content_type_options.value_or("").equals_ignoring_ascii_case("nosniff"sv)) {
m_mime_type = "text/plain";
} else {
m_mime_type = Core::guess_mime_type_based_on_filename(URL::percent_decode(url().serialize_path()));
m_mime_type = Core::guess_mime_type_based_on_filename(url().file_path());
}
}