Removed RFC 2965 specific requirements deprecated and superseded by RFC 6265

Partially reverts commit 379a8351
This commit is contained in:
Oleg Kalnichevski 2019-12-15 12:59:40 +01:00
parent 86b1a3b711
commit 35a63d3426
2 changed files with 0 additions and 20 deletions

View File

@ -55,14 +55,10 @@ public class CookieIdentityComparator implements Serializable, Comparator<Cookie
String d1 = c1.getDomain();
if (d1 == null) {
d1 = "";
} else if (d1.indexOf('.') == -1) {
d1 = d1 + ".local";
}
String d2 = c2.getDomain();
if (d2 == null) {
d2 = "";
} else if (d2.indexOf('.') == -1) {
d2 = d2 + ".local";
}
res = d1.compareToIgnoreCase(d2);
}

View File

@ -80,22 +80,6 @@ public class TestCookieIdentityComparator {
Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
@Test
public void testCookieIdentityComparasionByNameAndLocalHost() {
final CookieIdentityComparator comparator = new CookieIdentityComparator();
final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
c1.setDomain("localhost");
final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
c2.setDomain("localhost");
Assert.assertTrue(comparator.compare(c1, c2) == 0);
final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
c3.setDomain("localhost.local");
final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
c4.setDomain("localhost");
Assert.assertTrue(comparator.compare(c3, c4) == 0);
}
@Test
public void testCookieIdentityComparasionByNameDomainAndPath() {
final CookieIdentityComparator comparator = new CookieIdentityComparator();