From 2026ea557e9aa0d61cb683e94eaed20b63268263 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 17 Feb 2023 15:21:32 +0000 Subject: LibWeb: Use is_ascii_case_insensitive_match() where the spec says to --- Userland/Libraries/LibWeb/Fetch/Infrastructure/NoSniffBlocking.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/Fetch') 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 #include #include +#include namespace Web::Fetch::Infrastructure { @@ -22,7 +23,7 @@ ErrorOr 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. -- cgit v1.2.3