LibURL: Migrate Origin scheme from ByteString to String

This commit is contained in:
Sam Atkins 2024-11-27 16:18:42 +00:00 committed by Andreas Kling
commit 2e64e0b836
Notes: github-actions[bot] 2024-11-30 11:23:49 +00:00
6 changed files with 10 additions and 13 deletions

View file

@ -24,7 +24,7 @@ Trustworthiness is_origin_potentially_trustworthy(URL::Origin const& origin)
// 3. If origins scheme is either "https" or "wss", return "Potentially Trustworthy".
// Note: This is meant to be analog to the a priori authenticated URL concept in [MIX].
if (origin.scheme().is_one_of("https"sv, "wss"sv))
if (auto& scheme = origin.scheme(); scheme.has_value() && scheme->is_one_of("https"sv, "wss"sv))
return Trustworthiness::PotentiallyTrustworthy;
// 4. If origins host matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy".