From b781fa8e0382af8b53aa06e52cb003ff3823f2de Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Mon, 4 Jan 2016 20:22:48 +0000 Subject: [PATCH] HTTPCLIENT-1700: Netscape draft, browser compatibility, RFC 2109, RFC 2965 and default cookie specs to ignore cookies with empty name for consistency with RFC 6265 specs git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1722959 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/http/impl/cookie/CookieSpecBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java b/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java index 32730d25b..f4f98f191 100644 --- a/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java +++ b/httpclient/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java @@ -92,7 +92,7 @@ public abstract class CookieSpecBase extends AbstractCookieSpec { final String name = headerelement.getName(); final String value = headerelement.getValue(); if (name == null || name.isEmpty()) { - throw new MalformedCookieException("Cookie name may not be empty"); + continue; } final BasicClientCookie cookie = new BasicClientCookie(name, value);