[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
This commit is contained in:
Oleg Kalnichevski 2006-07-02 11:35:06 +00:00
parent 69e044571e
commit 88665f3e54
2 changed files with 4 additions and 2 deletions

View File

@ -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();
}

View File

@ -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) {