mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +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
|
|
@ -13,6 +13,7 @@
|
|||
#include <LibWeb/Fetch/Headers.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Bodies.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Headers.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/Request.h>
|
||||
|
|
@ -51,7 +52,7 @@ Optional<MimeSniff::MimeType> Request::mime_type_impl() const
|
|||
{
|
||||
// Objects including the Body interface mixin need to define an associated MIME type algorithm which takes no arguments and returns failure or a MIME type.
|
||||
// A Request object’s MIME type is to return the result of extracting a MIME type from its request’s header list.
|
||||
return m_request->header_list()->extract_mime_type();
|
||||
return Infrastructure::extract_mime_type(m_request->header_list());
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-body-body
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue