You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/12/20 09:27:00 UTC
[httpcomponents-client] branch master updated: Removed RFC 2965
specific requirements deprecated and superseded by RFC 6265
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 35a63d3 Removed RFC 2965 specific requirements deprecated and superseded by RFC 6265
35a63d3 is described below
commit 35a63d34262c303ebcffc28f1219b6492d74a007
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sun Dec 15 12:59:40 2019 +0100
Removed RFC 2965 specific requirements deprecated and superseded by RFC 6265
Partially reverts commit 379a8351
---
.../hc/client5/http/cookie/CookieIdentityComparator.java | 4 ----
.../http/impl/classic/TestCookieIdentityComparator.java | 16 ----------------
2 files changed, 20 deletions(-)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieIdentityComparator.java b/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieIdentityComparator.java
index 098788a..2e007fd 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieIdentityComparator.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieIdentityComparator.java
@@ -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);
}
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestCookieIdentityComparator.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestCookieIdentityComparator.java
index ceeff4f..8f627f8 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestCookieIdentityComparator.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestCookieIdentityComparator.java
@@ -81,22 +81,6 @@ public class TestCookieIdentityComparator {
}
@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();
final BasicClientCookie c1 = new BasicClientCookie("name", "value1");