Home | History | Annotate | Download | only in cookie

Lines Matching refs:cookie

2  * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2965VersionAttributeHandler.java $
32 package org.apache.http.impl.cookie;
34 import org.apache.http.cookie.ClientCookie;
35 import org.apache.http.cookie.Cookie;
36 import org.apache.http.cookie.CookieAttributeHandler;
37 import org.apache.http.cookie.CookieOrigin;
38 import org.apache.http.cookie.MalformedCookieException;
39 import org.apache.http.cookie.SetCookie;
40 import org.apache.http.cookie.SetCookie2;
43 * <tt>"Version"</tt> cookie attribute handler for RFC 2965 cookie spec.
52 * Parse cookie version attribute.
54 public void parse(final SetCookie cookie, final String value)
56 if (cookie == null) {
57 throw new IllegalArgumentException("Cookie may not be null");
70 throw new MalformedCookieException("Invalid cookie version.");
72 cookie.setVersion(version);
76 * validate cookie version attribute. Version attribute is REQUIRED.
78 public void validate(final Cookie cookie, final CookieOrigin origin)
80 if (cookie == null) {
81 throw new IllegalArgumentException("Cookie may not be null");
83 if (cookie instanceof SetCookie2) {
84 if (cookie instanceof ClientCookie
85 && !((ClientCookie) cookie).containsAttribute(ClientCookie.VERSION_ATTR)) {
92 public boolean match(final Cookie cookie, final CookieOrigin origin) {