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.String
SET_COOKIE_KEY
Deprecated.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 boolean
domainMatch(java.lang.String host, java.lang.String domain)
Deprecated.Performs domain-match as defined by the RFC2109.java.lang.String
formatCookie(Cookie cookie)
Deprecated.Return a string suitable for sending in a "Cookie" header as defined in RFC 2109java.lang.String
formatCookies(Cookie[] cookies)
Deprecated.Create a RFC 2109 compliant "Cookie" header value containing allCookie
s in cookies suitable for sending in a "Cookie" headervoid
parseAttribute(NameValuePair attribute, Cookie cookie)
Deprecated.Parse RFC 2109 specific cookie attribute and update the corresponsingCookie
properties.void
validate(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie cookie)
Deprecated.Performs RFC 2109 compliantCookie
validation-
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 corresponsingCookie
properties.- Specified by:
parseAttribute
in interfaceCookieSpec
- Overrides:
parseAttribute
in classCookieSpecBase
- Parameters:
attribute
-NameValuePair
cookie attribute from the Set- Cookiecookie
-Cookie
to 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 MalformedCookieException
Deprecated.Performs RFC 2109 compliantCookie
validation- Specified by:
validate
in interfaceCookieSpec
- Overrides:
validate
in classCookieSpecBase
- Parameters:
host
- the host from which theCookie
was receivedport
- the port from which theCookie
was receivedpath
- the path from which theCookie
was receivedsecure
- true when theCookie
was 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:
domainMatch
in interfaceCookieSpec
- Overrides:
domainMatch
in 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:
formatCookie
in interfaceCookieSpec
- Overrides:
formatCookie
in classCookieSpecBase
- Parameters:
cookie
- aCookie
to 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 allCookie
s in cookies suitable for sending in a "Cookie" header- Specified by:
formatCookies
in interfaceCookieSpec
- Overrides:
formatCookies
in classCookieSpecBase
- Parameters:
cookies
- an array ofCookie
s to be formatted- Returns:
- a string suitable for sending in a Cookie header.
-
-