Skip to content

Commit

Permalink
micro optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 12, 2024
1 parent ed0edf8 commit b0310fe
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ public boolean match(final Cookie cookie, final CookieOrigin origin) {
final int dotIndex = domain.indexOf('.');
if (dotIndex == 0 && domain.length() > 1 && domain.indexOf('.', 1) == -1) {
final String host = origin.getHost();
domain = domain.toLowerCase(Locale.ROOT);
if (browserVersion_.hasFeature(HTTP_COOKIE_REMOVE_DOT_FROM_ROOT_DOMAINS)) {
domain = domain.substring(1);
}
return host.equals(domain);
return host.equalsIgnoreCase(domain);
}

if (dotIndex == -1
Expand Down

0 comments on commit b0310fe

Please sign in to comment.