Class RFC2109Spec
- java.lang.Object
-
- org.apache.commons.httpclient.cookie.CookieSpecBase
-
- org.apache.commons.httpclient.cookie.RFC2109Spec
-
- All Implemented Interfaces:
CookieSpec
@Deprecated public class RFC2109Spec extends CookieSpecBase
Deprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.RFC 2109 specific cookie management functions
- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSET_COOKIE_KEYDeprecated.Cookie Response Header name for cookies processed by this spec.-
Fields inherited from interface org.apache.commons.httpclient.cookie.CookieSpec
PATH_DELIM, PATH_DELIM_CHAR
-
-
Constructor Summary
Constructors Constructor Description RFC2109Spec()Deprecated.Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleandomainMatch(java.lang.String host, java.lang.String domain)Deprecated.Performs domain-match as defined by the RFC2109.java.lang.StringformatCookie(Cookie cookie)Deprecated.Return a string suitable for sending in a "Cookie" header as defined in RFC 2109java.lang.StringformatCookies(Cookie[] cookies)Deprecated.Create a RFC 2109 compliant "Cookie" header value containing allCookies in cookies suitable for sending in a "Cookie" headervoidparseAttribute(NameValuePair attribute, Cookie cookie)Deprecated.Parse RFC 2109 specific cookie attribute and update the corresponsingCookieproperties.voidvalidate(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie cookie)Deprecated.Performs RFC 2109 compliantCookievalidation-
Methods inherited from class org.apache.commons.httpclient.cookie.CookieSpecBase
formatCookieHeader, formatCookieHeader, getValidDateFormats, match, match, parse, parse, pathMatch, setValidDateFormats
-
-
-
-
Field Detail
-
SET_COOKIE_KEY
public static final java.lang.String SET_COOKIE_KEY
Deprecated.Cookie Response Header name for cookies processed by this spec.- See Also:
- Constant Field Values
-
-
Method Detail
-
parseAttribute
public void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException
Deprecated.Parse RFC 2109 specific cookie attribute and update the corresponsingCookieproperties.- Specified by:
parseAttributein interfaceCookieSpec- Overrides:
parseAttributein classCookieSpecBase- Parameters:
attribute-NameValuePaircookie attribute from the Set- Cookiecookie-Cookieto be updated- Throws:
MalformedCookieException- if an exception occurs during parsing
-
validate
public void validate(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie cookie) throws MalformedCookieExceptionDeprecated.Performs RFC 2109 compliantCookievalidation- Specified by:
validatein interfaceCookieSpec- Overrides:
validatein classCookieSpecBase- Parameters:
host- the host from which theCookiewas receivedport- the port from which theCookiewas receivedpath- the path from which theCookiewas receivedsecure- true when theCookiewas received using a secure connectioncookie- The cookie to validate- Throws:
MalformedCookieException- if an exception occurs during validation
-
domainMatch
public boolean domainMatch(java.lang.String host, java.lang.String domain)Deprecated.Performs domain-match as defined by the RFC2109.- Specified by:
domainMatchin interfaceCookieSpec- Overrides:
domainMatchin classCookieSpecBase- Parameters:
host- The target host.domain- The cookie domain attribute.- Returns:
- true if the specified host matches the given domain.
- Since:
- 3.0
-
formatCookie
public java.lang.String formatCookie(Cookie cookie)
Deprecated.Return a string suitable for sending in a "Cookie" header as defined in RFC 2109- Specified by:
formatCookiein interfaceCookieSpec- Overrides:
formatCookiein classCookieSpecBase- Parameters:
cookie- aCookieto be formatted as string- Returns:
- a string suitable for sending in a "Cookie" header.
-
formatCookies
public java.lang.String formatCookies(Cookie[] cookies)
Deprecated.Create a RFC 2109 compliant "Cookie" header value containing allCookies in cookies suitable for sending in a "Cookie" header- Specified by:
formatCookiesin interfaceCookieSpec- Overrides:
formatCookiesin classCookieSpecBase- Parameters:
cookies- an array ofCookies to be formatted- Returns:
- a string suitable for sending in a Cookie header.
-
-