diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-17 15:21:32 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-19 00:46:47 +0100 |
commit | 2026ea557e9aa0d61cb683e94eaed20b63268263 (patch) | |
tree | 1bd12be42d983920ca34f2a1335b81e6c8fe76a6 /Userland/Libraries/LibWeb/Fetch | |
parent | f0b72b819e83ed970e1db5ee887ab1eefcb34029 (diff) | |
download | serenity-2026ea557e9aa0d61cb683e94eaed20b63268263.zip |
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch')
-rw-r--r-- | Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp index d40d4f759c..1d762df730 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp @@ -8,6 +8,7 @@ #include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h> #include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h> #include <LibWeb/Fetch/Infrastructure/NoSniffBlocking.h> +#include <LibWeb/Infra/Strings.h> namespace Web::Fetch::Infrastructure { @@ -22,7 +23,7 @@ ErrorOr<bool> determine_nosniff(HeaderList const& list) return false; // 3. If values[0] is an ASCII case-insensitive match for "nosniff", then return true. - if (!values->is_empty() && values->at(0).equals_ignoring_case("nosniff"sv)) + if (!values->is_empty() && Infra::is_ascii_case_insensitive_match(values->at(0), "nosniff"sv)) return true; // 4. Return false. |