mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Implement and use "isomorphic decoding"
This commit is contained in:
parent
d79fcceb8a
commit
ebb8342cf2
Notes:
github-actions[bot]
2024-10-29 12:27:12 +00:00
Author: https://github.com/Gingeh
Commit: ebb8342cf2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1893
Reviewed-by: https://github.com/trflynn89
6 changed files with 40 additions and 13 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <AK/Base64.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/URL.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
@ -75,7 +76,7 @@ ErrorOr<DataURL> process_data_url(URL::URL const& data_url)
|
|||
trimmed_substring_view = trimmed_substring_view.trim(" "sv, TrimMode::Right);
|
||||
if (trimmed_substring_view.ends_with(';')) {
|
||||
// 1. Let stringBody be the isomorphic decode of body.
|
||||
auto string_body = StringView(body);
|
||||
auto string_body = Infra::isomorphic_decode(body);
|
||||
|
||||
// 2. Set body to the forgiving-base64 decode of stringBody.
|
||||
// 3. If body is failure, then return failure.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue