| java.lang.Object org.apache.commons.httpclient.cookie.CookieSpecBase org.apache.commons.httpclient.cookie.NetscapeDraftSpec
Method Summary | |
public boolean | domainMatch(String host, String domain) Performs domain-match as described in the Netscape draft.
Parameters: host - The target host. Parameters: domain - The cookie domain attribute. | public Cookie[] | parse(String host, int port, String path, boolean secure, String header) Parses the Set-Cookie value into an array of Cookies.
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. | public void | parseAttribute(NameValuePair attribute, Cookie cookie) | public void | validate(String host, int port, String path, boolean secure, Cookie cookie) |
NetscapeDraftSpec | public NetscapeDraftSpec()(Code) | | Default constructor
|
domainMatch | public boolean domainMatch(String host, String domain)(Code) | | Performs domain-match as described in the Netscape draft.
Parameters: host - The target host. Parameters: domain - The cookie domain attribute. true if the specified host matches the given domain. |
parse | public Cookie[] parse(String host, int port, String path, boolean secure, String header) throws MalformedCookieException(Code) | | Parses the Set-Cookie value into an array of Cookies.
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.
http://wp.netscape.com/newsref/std/cookie_spec.html Parameters: host - the host from which the Set-Cookie value wasreceived Parameters: port - the port from which the Set-Cookie value wasreceived Parameters: path - the path from which the Set-Cookie value wasreceived Parameters: secure - true when the Set-Cookie value wasreceived over secure conection Parameters: header - the Set-Cookie received from the server an array of Cookies parsed from the Set-Cookie value throws: MalformedCookieException - if an exception occurs during parsing since: 3.0 |
validate | public void validate(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException(Code) | | Performs Netscape draft compliant
Cookie validation
Parameters: host - the host from which the Cookie was received Parameters: port - the port from which the Cookie was received Parameters: path - the path from which the Cookie was received Parameters: secure - true when the Cookie was received using a secure connection Parameters: cookie - The cookie to validate. throws: MalformedCookieException - if an exception occurs duringvalidation |
Fields inherited from org.apache.commons.httpclient.cookie.CookieSpecBase | final protected static Log LOG(Code)(Java Doc)
|
Methods inherited from org.apache.commons.httpclient.cookie.CookieSpecBase | public boolean domainMatch(String host, String domain)(Code)(Java Doc) public String formatCookie(Cookie cookie)(Code)(Java Doc) public Header formatCookieHeader(Cookie[] cookies)(Code)(Java Doc) public Header formatCookieHeader(Cookie cookie)(Code)(Java Doc) public String formatCookies(Cookie[] cookies) throws IllegalArgumentException(Code)(Java Doc) public Collection getValidDateFormats()(Code)(Java Doc) public boolean match(String host, int port, String path, boolean secure, Cookie cookie)(Code)(Java Doc) public Cookie[] match(String host, int port, String path, boolean secure, Cookie cookies)(Code)(Java Doc) public Cookie[] parse(String host, int port, String path, boolean secure, String header) throws MalformedCookieException(Code)(Java Doc) public Cookie[] parse(String host, int port, String path, boolean secure, Header header) throws MalformedCookieException(Code)(Java Doc) public void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException(Code)(Java Doc) public boolean pathMatch(String path, String topmostPath)(Code)(Java Doc) public void setValidDateFormats(Collection datepatterns)(Code)(Java Doc) public void validate(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException(Code)(Java Doc)
|
|
|