diff --git a/src/java/org/apache/http/cookie/impl/BrowserCompatSpec.java b/src/java/org/apache/http/cookie/impl/BrowserCompatSpec.java index b7cfe64ef..fe6019168 100644 --- a/src/java/org/apache/http/cookie/impl/BrowserCompatSpec.java +++ b/src/java/org/apache/http/cookie/impl/BrowserCompatSpec.java @@ -36,6 +36,7 @@ import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.MalformedCookieException; import org.apache.http.io.CharArrayBuffer; import org.apache.http.message.BasicHeader; +import org.apache.http.message.BasicHeaderElement; import org.apache.http.util.DateParseException; import org.apache.http.util.DateUtils; @@ -117,7 +118,7 @@ public class BrowserCompatSpec extends CookieSpecBase { } HeaderElement[] elems = null; if (isNetscapeCookie) { - elems = new HeaderElement[] { HeaderElement.parse(headervalue) }; + elems = new HeaderElement[] { BasicHeaderElement.parse(headervalue) }; } else { elems = header.getElements(); } diff --git a/src/java/org/apache/http/cookie/impl/NetscapeDraftSpec.java b/src/java/org/apache/http/cookie/impl/NetscapeDraftSpec.java index b5db7d273..3b847837e 100644 --- a/src/java/org/apache/http/cookie/impl/NetscapeDraftSpec.java +++ b/src/java/org/apache/http/cookie/impl/NetscapeDraftSpec.java @@ -36,6 +36,7 @@ import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.MalformedCookieException; import org.apache.http.io.CharArrayBuffer; import org.apache.http.message.BasicHeader; +import org.apache.http.message.BasicHeaderElement; /** * Netscape cookie draft compliant cookie policy @@ -103,7 +104,7 @@ public class NetscapeDraftSpec extends CookieSpecBase { throw new IllegalArgumentException("Cookie origin may not be null"); } String headervalue = header.getValue(); - return parse(new HeaderElement[] { HeaderElement.parse(headervalue) }, origin); + return parse(new HeaderElement[] { BasicHeaderElement.parse(headervalue) }, origin); } public Header[] formatCookies(final Cookie[] cookies) {