mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00: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:
parent
0fd80a8f99
commit
3dce6766a3
Notes:
github-actions[bot]
2025-11-27 13:58:58 +00:00
Author: https://github.com/trflynn89
Commit: 3dce6766a3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6944
Reviewed-by: https://github.com/gmta ✅
30 changed files with 382 additions and 299 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchController.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/MIME.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Methods.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
|
||||
|
|
@ -366,7 +367,7 @@ MimeSniff::MimeType XMLHttpRequest::get_final_mime_type() const
|
|||
MimeSniff::MimeType XMLHttpRequest::get_response_mime_type() const
|
||||
{
|
||||
// 1. Let mimeType be the result of extracting a MIME type from xhr’s response’s header list.
|
||||
auto mime_type = m_response->header_list()->extract_mime_type();
|
||||
auto mime_type = Fetch::Infrastructure::extract_mime_type(m_response->header_list());
|
||||
|
||||
// 2. If mimeType is failure, then set mimeType to text/xml.
|
||||
if (!mime_type.has_value())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue