org.apache.commons.httpclient.cookie
public class RFC2109Spec extends CookieSpecBase
RFC 2109 specific cookie management functions
Since: 2.0
Constructor Summary | |
---|---|
RFC2109Spec() Default constructor |
Method Summary | |
---|---|
boolean | domainMatch(String host, String domain)
Performs domain-match as defined by the RFC2109. |
String | formatCookie(Cookie cookie)
Return a string suitable for sending in a "Cookie" header as
defined in RFC 2109 |
String | formatCookies(Cookie[] cookies)
Create a RFC 2109 compliant "Cookie" header value containing all
{@link Cookie}s in cookies suitable for sending in a "Cookie"
header |
void | parseAttribute(NameValuePair attribute, Cookie cookie)
Parse RFC 2109 specific cookie attribute and update the corresponsing
{@link Cookie} properties.
|
void | validate(String host, int port, String path, boolean secure, Cookie cookie)
Performs RFC 2109 compliant {@link Cookie} validation
|
Parameters: host The target host. domain The cookie domain attribute.
Returns: true if the specified host matches the given domain.
Since: 3.0
Parameters: cookie a {@link Cookie} to be formatted as string
Returns: a string suitable for sending in a "Cookie" header.
Parameters: cookies an array of {@link Cookie}s to be formatted
Returns: a string suitable for sending in a Cookie header.
Parameters: attribute {@link NameValuePair} cookie attribute from the Set- Cookie cookie {@link Cookie} to be updated
Throws: MalformedCookieException if an exception occurs during parsing
Parameters: host the host from which the {@link Cookie} was received port the port from which the {@link Cookie} was received path the path from which the {@link Cookie} was received secure true when the {@link Cookie} was received using a secure connection cookie The cookie to validate
Throws: MalformedCookieException if an exception occurs during validation