diff --git a/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java b/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java index 2cafcf11c..062f8ec6a 100644 --- a/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java +++ b/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java @@ -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); }