summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-07-20 17:47:29 +0100
committerLinus Groh <mail@linusgroh.de>2022-07-20 18:03:21 +0100
commit042dfc72848d640f03e40005ff54142aa392d65b (patch)
tree82302d4effdbd99a445044e99a3a4823780213b5 /Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h
parentdfd62437c4864520faf9c545c5864bf6feaa5720 (diff)
downloadserenity-042dfc72848d640f03e40005ff54142aa392d65b.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h')
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h
index 47dc89dccf..db36c03f75 100644
--- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h
+++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Headers.h
@@ -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>);