From 88665f3e54b967411c467400f281c9e749ba37f2 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sun, 2 Jul 2006 11:35:06 +0000 Subject: [PATCH] [HTTPCORE-5] Made HeaderElement an interface git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@418580 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/http/cookie/impl/BrowserCompatSpec.java | 3 ++- src/java/org/apache/http/cookie/impl/NetscapeDraftSpec.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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) {