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 class PublicSuffixDomainFilter implements CommonCookieAttributeHandler {
|
|||
@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…
Reference in New Issue