Package org.apache.http.impl.cookie
Class RFC2965PortAttributeHandler
java.lang.Object
org.apache.http.impl.cookie.RFC2965PortAttributeHandler
- All Implemented Interfaces:
CookieAttributeHandler
public class RFC2965PortAttributeHandler extends Object implements CookieAttributeHandler
"Port" cookie attribute handler for RFC 2965 cookie spec.
-
Constructor Summary
Constructors Constructor Description RFC2965PortAttributeHandler() -
Method Summary
Modifier and Type Method Description booleanmatch(Cookie cookie, CookieOrigin origin)Match cookie port attribute.voidparse(SetCookie cookie, String portValue)Parse cookie port attribute.voidvalidate(Cookie cookie, CookieOrigin origin)Validate cookie port attribute.
-
Constructor Details
-
RFC2965PortAttributeHandler
public RFC2965PortAttributeHandler()
-
-
Method Details
-
parse
Parse cookie port attribute.- Specified by:
parsein interfaceCookieAttributeHandler- Parameters:
cookie-Cookieto be updatedportValue- cookie attribute value from the cookie response header- Throws:
MalformedCookieException
-
validate
Validate cookie port attribute. If the Port attribute was specified in header, the request port must be in cookie's port list.- Specified by:
validatein interfaceCookieAttributeHandler- Parameters:
cookie-Cookieto validateorigin- the cookie source to validate against- Throws:
MalformedCookieException- if cookie validation fails for this attribute
-
match
Match cookie port attribute. If the Port attribute is not specified in header, the cookie can be sent to any port. Otherwise, the request port must be in the cookie's port list.- Specified by:
matchin interfaceCookieAttributeHandler- Parameters:
cookie-Cookieto matchorigin- the cookie source to match against- Returns:
- true if the match is successful; false otherwise
-