Class RFC2109Spec
java.lang.Object
org.apache.commons.httpclient.cookie.CookieSpecBase
org.apache.commons.httpclient.cookie.RFC2109Spec
- All Implemented Interfaces:
CookieSpec
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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.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 -
Method Summary
Modifier and TypeMethodDescriptionbooleandomainMatch(String host, String domain) Deprecated.Performs domain-match as defined by the RFC2109.formatCookie(Cookie cookie) Deprecated.Return a string suitable for sending in a "Cookie" header as defined in RFC 2109formatCookies(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.voidDeprecated.Performs RFC 2109 compliantCookievalidationMethods inherited from class org.apache.commons.httpclient.cookie.CookieSpecBase
formatCookieHeader, formatCookieHeader, getValidDateFormats, match, match, parse, parse, pathMatch, setValidDateFormats
-
Field Details
-
SET_COOKIE_KEY
Deprecated.Cookie Response Header name for cookies processed by this spec.- See Also:
-
-
Constructor Details
-
RFC2109Spec
public RFC2109Spec()Deprecated.Default constructor
-
-
Method Details
-
parseAttribute
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(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException Deprecated.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
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
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
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.
-