"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java" between
httpcomponents-client-4.5.5-src.tar.gz and httpcomponents-client-4.5.6-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources. (Web) Server ("httpd").

PublicSuffixDomainFilter.java  (httpcomponents-client-4.5.5-src):PublicSuffixDomainFilter.java  (httpcomponents-client-4.5.6-src)
skipping to change at line 93 skipping to change at line 93
this.publicSuffixMatcher = new PublicSuffixMatcher(suffixList.getRules() , suffixList.getExceptions()); this.publicSuffixMatcher = new PublicSuffixMatcher(suffixList.getRules() , suffixList.getExceptions());
this.localDomainMap = createLocalDomainMap(); this.localDomainMap = createLocalDomainMap();
} }
/** /**
* Never matches if the cookie's domain is from the blacklist. * Never matches if the cookie's domain is from the blacklist.
*/ */
@Override @Override
public boolean match(final Cookie cookie, final CookieOrigin origin) { public boolean match(final Cookie cookie, final CookieOrigin origin) {
final String host = cookie.getDomain(); final String host = cookie.getDomain();
if (host == null) {
return false;
}
final int i = host.indexOf('.'); final int i = host.indexOf('.');
if (i >= 0) { if (i >= 0) {
final String domain = host.substring(i); final String domain = host.substring(i);
if (!this.localDomainMap.containsKey(domain)) { if (!this.localDomainMap.containsKey(domain)) {
if (this.publicSuffixMatcher.matches(host)) { if (this.publicSuffixMatcher.matches(host)) {
return false; return false;
} }
} }
} else { } else {
if (!host.equalsIgnoreCase(origin.getHost())) { if (!host.equalsIgnoreCase(origin.getHost())) {
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)