LibWeb/Fetch: Use MimeType in DataURL

This commit is contained in:
Jamie Mansfield 2024-06-02 17:34:46 +01:00 committed by Andreas Kling
commit 295c4ef51a
Notes: sideshowbarker 2024-07-17 09:37:30 +09:00
5 changed files with 21 additions and 19 deletions

View file

@ -851,8 +851,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> scheme_fetch(JS::Realm& r
return PendingResponse::create(vm, request, Infrastructure::Response::network_error(vm, "Failed to process 'data:' URL"sv));
// 3. Let mimeType be dataURLStructs MIME type, serialized.
// FIXME: Serialize MIME type.
auto const& mime_type = data_url_struct.value().mime_type;
auto const& mime_type = MUST(data_url_struct.value().mime_type.serialized());
// 4. Return a new response whose status message is `OK`, header list is « (`Content-Type`, mimeType) », and
// body is dataURLStructs body as a body.