HTTPCLIENT-1904: check cookie domain for null

This commit is contained in:
Hans-Peter Keck 2018-02-09 10:21:59 +01:00 committed by Oleg Kalnichevski
parent 1253d7f411
commit a2cc0a511b
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ public class PublicSuffixDomainFilter implements CommonCookieAttributeHandler {
@Override
public boolean match(final Cookie cookie, final CookieOrigin origin) {
final String host = cookie.getDomain();
if (host == null) {
return false;
}
final int i = host.indexOf('.');
if (i >= 0) {
final String domain = host.substring(i);