|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.impl.cookie.AbstractCookieSpec org.apache.http.impl.cookie.CookieSpecBase org.apache.http.impl.cookie.NetscapeDraftSpec
@Obsolete @Contract(threading=SAFE) public class NetscapeDraftSpec
This CookieSpec
implementation conforms to
the original draft specification published by Netscape Communications.
It should be avoided unless absolutely necessary for compatibility with
legacy applications.
Rendered obsolete by RFC6265LaxSpec
.
RFC6265LaxSpec
Field Summary | |
---|---|
protected static String |
EXPIRES_PATTERN
|
Constructor Summary | |
---|---|
NetscapeDraftSpec()
|
|
NetscapeDraftSpec(String[] datepatterns)
Default constructor |
Method Summary | |
---|---|
List<org.apache.http.Header> |
formatCookies(List<Cookie> cookies)
Create "Cookie" headers for an array of Cookies. |
int |
getVersion()
Returns version of the state management this cookie specification conforms to. |
org.apache.http.Header |
getVersionHeader()
Returns a request header identifying what version of the state management specification is understood. |
List<Cookie> |
parse(org.apache.http.Header header,
CookieOrigin origin)
Parses the Set-Cookie value into an array of Cookie s. |
String |
toString()
|
Methods inherited from class org.apache.http.impl.cookie.CookieSpecBase |
---|
getDefaultDomain, getDefaultPath, match, parse, validate |
Methods inherited from class org.apache.http.impl.cookie.AbstractCookieSpec |
---|
findAttribHandler, getAttribHandler, getAttribHandlers, registerAttribHandler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String EXPIRES_PATTERN
Constructor Detail |
---|
public NetscapeDraftSpec(String[] datepatterns)
public NetscapeDraftSpec()
Method Detail |
---|
public List<Cookie> parse(org.apache.http.Header header, CookieOrigin origin) throws MalformedCookieException
Cookie
s.
Syntax of the Set-Cookie HTTP Response Header:
This is the format a CGI script would use to add to the HTTP headers a new piece of data which is to be stored by the client for later retrieval.
Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME; secure
Please note that the Netscape draft specification does not fully conform to the HTTP
header format. Comma character if present in Set-Cookie
will not be treated
as a header element separator
header
- the Set-Cookie
received from the serverorigin
- details of the cookie origin
Cookie
s parsed from the Set-Cookie value
MalformedCookieException
- if an exception occurs during parsingpublic List<org.apache.http.Header> formatCookies(List<Cookie> cookies)
CookieSpec
"Cookie"
headers for an array of Cookies.
cookies
- the Cookies format into a Cookie header
public int getVersion()
CookieSpec
public org.apache.http.Header getVersionHeader()
CookieSpec
null
if the cookie
specification does not support Cookie2
header.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |