|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.cookie.AbstractCookieSpec
org.apache.http.impl.cookie.CookieSpecBase
org.apache.http.impl.cookie.NetscapeDraftSpec
public class NetscapeDraftSpec
Netscape cookie draft compliant cookie policy
Field Summary | |
---|---|
protected static java.lang.String |
EXPIRES_PATTERN
|
Constructor Summary | |
---|---|
NetscapeDraftSpec()
Default constructor |
|
NetscapeDraftSpec(java.lang.String[] datepatterns)
Default constructor |
Method Summary | |
---|---|
java.util.List<org.apache.http.Header> |
formatCookies(java.util.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. |
java.util.List<Cookie> |
parse(org.apache.http.Header header,
CookieOrigin origin)
Parses the Set-Cookie value into an array of Cookies. |
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, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String EXPIRES_PATTERN
Constructor Detail |
---|
public NetscapeDraftSpec(java.lang.String[] datepatterns)
public NetscapeDraftSpec()
Method Detail |
---|
public java.util.List<Cookie> parse(org.apache.http.Header header, CookieOrigin origin) throws MalformedCookieException
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 Netscape draft specification does not fully conform to the HTTP header format. Netscape draft does not specify whether multiple cookies may be sent in one header. Hence, comma character may be present in unquoted cookie value or unquoted parameter value.
header
- the Set-Cookie received from the serverorigin
- details of the cookie origin
MalformedCookieException
- if an exception occurs during parsingpublic java.util.List<org.apache.http.Header> formatCookies(java.util.List<Cookie> cookies)
CookieSpec
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |