mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
string matching is cheaper than regex matching so do it first
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1622753 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e83772d35
commit
3bb9aa5099
@ -71,7 +71,7 @@ public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, fina
|
||||
@Override
|
||||
public boolean match(final Cookie cookie, final CookieOrigin origin) {
|
||||
final String domain = cookie.getDomain();
|
||||
if (matcher.matches(domain) && !domain.equalsIgnoreCase("localhost")) {
|
||||
if (!domain.equalsIgnoreCase("localhost") && matcher.matches(domain)) {
|
||||
return false;
|
||||
} else {
|
||||
return handler.match(cookie, origin);
|
||||
|
Loading…
x
Reference in New Issue
Block a user