HTTPCLIENT-1685: PublicSuffixDomainFilter to ignore local hosts and local domains (follow-up)

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1706582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2015-10-03 13:46:01 +00:00
parent e3232f5425
commit 2f062b3b43
1 changed files with 6 additions and 0 deletions

View File

@ -97,6 +97,12 @@ public class PublicSuffixDomainFilter implements CommonCookieAttributeHandler {
return false;
}
}
} else {
if (!host.equalsIgnoreCase(origin.getHost())) {
if (this.publicSuffixMatcher.matches(host)) {
return false;
}
}
}
return handler.match(cookie, origin);
}