@NotThreadSafe public class NetscapeDraftSpecHC4 extends CookieSpecBaseHC4
CookieSpec implementation conforms to
the original draft specification published by Netscape Communications.
It should be avoided unless absolutely necessary for compatibility with
legacy applications.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
EXPIRES_PATTERN |
| Constructor and Description |
|---|
NetscapeDraftSpecHC4()
Default constructor
|
NetscapeDraftSpecHC4(java.lang.String[] datepatterns)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<org.apache.http.Header> |
formatCookies(java.util.List<org.apache.http.cookie.Cookie> cookies) |
int |
getVersion() |
org.apache.http.Header |
getVersionHeader() |
java.util.List<org.apache.http.cookie.Cookie> |
parse(org.apache.http.Header header,
org.apache.http.cookie.CookieOrigin origin)
Parses the Set-Cookie value into an array of Cookies.
|
java.lang.String |
toString() |
getDefaultDomain, getDefaultPath, match, parse, validatefindAttribHandler, getAttribHandler, getAttribHandlers, registerAttribHandlerprotected static final java.lang.String EXPIRES_PATTERN
public NetscapeDraftSpecHC4(java.lang.String[] datepatterns)
public NetscapeDraftSpecHC4()
public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header header,
org.apache.http.cookie.CookieOrigin origin)
throws org.apache.http.cookie.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 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 serverorg.apache.http.cookie.MalformedCookieException - if an exception occurs during parsingpublic java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie> cookies)
public int getVersion()
public org.apache.http.Header getVersionHeader()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1999-2015 The Apache Software Foundation. All rights reserved.