mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
AK+LibURL+LibWeb: Use simdutf to validate ASCII strings
simdutf provides a vectorized ASCII validator, so let's use that instead of looping over strings manually.
This commit is contained in:
parent
212095e1c2
commit
ee6b2db009
Notes:
github-actions[bot]
2025-04-06 15:06:55 +00:00
Author: https://github.com/trflynn89
Commit: ee6b2db009
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4252
10 changed files with 32 additions and 11 deletions
|
@ -333,10 +333,8 @@ void CookieJar::store_cookie(Web::Cookie::ParsedCookie const& parsed_cookie, con
|
|||
|
||||
// 8. If the domain-attribute contains a character that is not in the range of [USASCII] characters, abort these
|
||||
// steps and ignore the cookie entirely.
|
||||
for (auto code_point : domain_attribute.code_points()) {
|
||||
if (!is_ascii(code_point))
|
||||
return;
|
||||
}
|
||||
if (!domain_attribute.is_ascii())
|
||||
return;
|
||||
|
||||
// 9. If the user agent is configured to reject "public suffixes" and the domain-attribute is a public suffix:
|
||||
if (URL::is_public_suffix(domain_attribute)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue