mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibWeb: Move extract_mime_type() from XMLHttpRequest to HeaderList
Except some minor tweaks, this is a direct copy of Luke's initial implementation in XMLHttpRequest, now replacing the former.
This commit is contained in:
parent
dfd62437c4
commit
042dfc7284
Notes:
sideshowbarker
2024-07-17 08:45:14 +09:00
Author: https://github.com/linusg
Commit: 042dfc7284
Pull-request: https://github.com/SerenityOS/serenity/pull/14628
4 changed files with 63 additions and 60 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
|
@ -38,6 +39,7 @@ public:
|
|||
[[nodiscard]] ErrorOr<void> set(Header);
|
||||
[[nodiscard]] ErrorOr<void> combine(Header);
|
||||
[[nodiscard]] ErrorOr<Vector<Header>> sort_and_combine() const;
|
||||
[[nodiscard]] Optional<MimeSniff::MimeType> extract_mime_type() const;
|
||||
};
|
||||
|
||||
[[nodiscard]] ErrorOr<OrderedHashTable<ByteBuffer>> convert_header_names_to_a_sorted_lowercase_set(Span<ReadonlyBytes>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue