mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Extract some CORS and MIME Fetch helpers to their own files
An upcoming commit will migrate the contents of Headers.h/cpp to LibHTTP for use outside of LibWeb. These CORS and MIME helpers depend on other LibWeb facilities, however, so they cannot be moved.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
0fd80a8f99
commit
3dce6766a3
Notes:
github-actions[bot]
2025-11-27 13:58:58 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3dce6766a39 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6944 Reviewed-by: https://github.com/gmta ✅
@@ -18,6 +18,7 @@
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/Fetch/Fetching/Fetching.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/MIME.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
#include <LibWeb/HTML/DecodedImageData.h>
|
||||
#include <LibWeb/HTML/HTMLMediaElement.h>
|
||||
@@ -361,7 +362,7 @@ void HTMLObjectElement::resource_did_load(Fetch::Infrastructure::Response const&
|
||||
|
||||
// 3. Run the appropriate set of steps from the following list:
|
||||
// -> If the resource has associated Content-Type metadata
|
||||
if (auto content_type = response.header_list()->extract_mime_type(); content_type.has_value()) {
|
||||
if (auto content_type = Fetch::Infrastructure::extract_mime_type(response.header_list()); content_type.has_value()) {
|
||||
// 1. Let binary be false.
|
||||
bool binary = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user