< prev index next >
src/java.base/share/classes/java/net/HttpCookie.java
Print this page
*** 664,674 ****
}
int domainLength = domain.length();
int lengthDiff = host.length() - domainLength;
if (lengthDiff == 0) {
! // if the host name and the domain name are just string-compare euqal
return host.equalsIgnoreCase(domain);
}
else if (lengthDiff > 0) {
// need to check H & D component
String H = host.substring(0, lengthDiff);
--- 664,674 ----
}
int domainLength = domain.length();
int lengthDiff = host.length() - domainLength;
if (lengthDiff == 0) {
! // if the host name and the domain name are just string-compare equal
return host.equalsIgnoreCase(domain);
}
else if (lengthDiff > 0) {
// need to check H & D component
String H = host.substring(0, lengthDiff);
*** 1129,1139 ****
/*
* Split cookie header string according to rfc 2965:
* 1) split where it is a comma;
* 2) but not the comma surrounding by double-quotes, which is the comma
! * inside port list or embeded URIs.
*
* @param header
* the cookie header string to split
*
* @return list of strings; never null
--- 1129,1139 ----
/*
* Split cookie header string according to rfc 2965:
* 1) split where it is a comma;
* 2) but not the comma surrounding by double-quotes, which is the comma
! * inside port list or embedded URIs.
*
* @param header
* the cookie header string to split
*
* @return list of strings; never null
< prev index next >