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
parent 2b59ba19e0
commit 295c4ef51a
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.