mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 23:16:33 +00:00
HTTPCLIENT-1904: check cookie domain for null
This commit is contained in:
parent
1253d7f411
commit
a2cc0a511b
@ -90,6 +90,9 @@ public PublicSuffixDomainFilter(
|
|||||||
@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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user