public class RFC2109Spec extends CookieSpecBase
RFC 2109 specific cookie management functions
LOGPATH_DELIM, PATH_DELIM_CHAR| 构造器和说明 |
|---|
RFC2109Spec()
Default constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
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
Cookies 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
Cookie properties. |
void |
validate(String host,
int port,
String path,
boolean secure,
Cookie cookie)
Performs RFC 2109 compliant
Cookie validation |
formatCookieHeader, formatCookieHeader, getValidDateFormats, match, match, parse, parse, pathMatch, setValidDateFormatspublic void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException
Cookie properties.parseAttribute 在接口中 CookieSpecparseAttribute 在类中 CookieSpecBaseattribute - NameValuePair cookie attribute from the
Set- Cookiecookie - Cookie to be updatedMalformedCookieException - if an exception occurs during parsingpublic void validate(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException
Cookie validationvalidate 在接口中 CookieSpecvalidate 在类中 CookieSpecBasehost - the host from which the Cookie was receivedport - the port from which the Cookie was receivedpath - the path from which the Cookie was receivedsecure - true when the Cookie was received using a
secure connectioncookie - The cookie to validateMalformedCookieException - if an exception occurs during
validationpublic boolean domainMatch(String host, String domain)
domainMatch 在接口中 CookieSpecdomainMatch 在类中 CookieSpecBasehost - The target host.domain - The cookie domain attribute.public String formatCookie(Cookie cookie)
formatCookie 在接口中 CookieSpecformatCookie 在类中 CookieSpecBasecookie - a Cookie to be formatted as stringpublic String formatCookies(Cookie[] cookies)
Cookies in cookies suitable for sending in a "Cookie"
headerformatCookies 在接口中 CookieSpecformatCookies 在类中 CookieSpecBasecookies - an array of Cookies to be formattedCopyright © 2017. All rights reserved.