[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:
parent
69e044571e
commit
88665f3e54
|
@ -36,6 +36,7 @@ import org.apache.http.cookie.CookieOrigin;
|
||||||
import org.apache.http.cookie.MalformedCookieException;
|
import org.apache.http.cookie.MalformedCookieException;
|
||||||
import org.apache.http.io.CharArrayBuffer;
|
import org.apache.http.io.CharArrayBuffer;
|
||||||
import org.apache.http.message.BasicHeader;
|
import org.apache.http.message.BasicHeader;
|
||||||
|
import org.apache.http.message.BasicHeaderElement;
|
||||||
import org.apache.http.util.DateParseException;
|
import org.apache.http.util.DateParseException;
|
||||||
import org.apache.http.util.DateUtils;
|
import org.apache.http.util.DateUtils;
|
||||||
|
|
||||||
|
@ -117,7 +118,7 @@ public class BrowserCompatSpec extends CookieSpecBase {
|
||||||
}
|
}
|
||||||
HeaderElement[] elems = null;
|
HeaderElement[] elems = null;
|
||||||
if (isNetscapeCookie) {
|
if (isNetscapeCookie) {
|
||||||
elems = new HeaderElement[] { HeaderElement.parse(headervalue) };
|
elems = new HeaderElement[] { BasicHeaderElement.parse(headervalue) };
|
||||||
} else {
|
} else {
|
||||||
elems = header.getElements();
|
elems = header.getElements();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.apache.http.cookie.CookieOrigin;
|
||||||
import org.apache.http.cookie.MalformedCookieException;
|
import org.apache.http.cookie.MalformedCookieException;
|
||||||
import org.apache.http.io.CharArrayBuffer;
|
import org.apache.http.io.CharArrayBuffer;
|
||||||
import org.apache.http.message.BasicHeader;
|
import org.apache.http.message.BasicHeader;
|
||||||
|
import org.apache.http.message.BasicHeaderElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Netscape cookie draft compliant cookie policy
|
* Netscape cookie draft compliant cookie policy
|
||||||
|
@ -103,7 +104,7 @@ public class NetscapeDraftSpec extends CookieSpecBase {
|
||||||
throw new IllegalArgumentException("Cookie origin may not be null");
|
throw new IllegalArgumentException("Cookie origin may not be null");
|
||||||
}
|
}
|
||||||
String headervalue = header.getValue();
|
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) {
|
public Header[] formatCookies(final Cookie[] cookies) {
|
||||||
|
|
Loading…
Reference in New Issue