Home | History | Annotate | Download | only in cookie

Lines Matching defs:cookie

2  * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java $
32 package org.apache.http.impl.cookie;
40 import org.apache.http.cookie.Cookie;
41 import org.apache.http.cookie.CookieAttributeHandler;
42 import org.apache.http.cookie.CookieOrigin;
43 import org.apache.http.cookie.MalformedCookieException;
46 * Cookie management functions shared by all specification.
76 protected List<Cookie> parse(final HeaderElement[] elems, final CookieOrigin origin)
78 List<Cookie> cookies = new ArrayList<Cookie>(elems.length);
83 throw new MalformedCookieException("Cookie name may not be empty");
86 BasicClientCookie cookie = new BasicClientCookie(name, value);
87 cookie.setPath(getDefaultPath(origin));
88 cookie.setDomain(getDefaultDomain(origin));
96 cookie.setAttribute(s, attrib.getValue());
100 handler.parse(cookie, attrib.getValue());
103 cookies.add(cookie);
108 public void validate(final Cookie cookie, final CookieOrigin origin)
110 if (cookie == null) {
111 throw new IllegalArgumentException("Cookie may not be null");
114 throw new IllegalArgumentException("Cookie origin may not be null");
117 handler.validate(cookie, origin);
121 public boolean match(final Cookie cookie, final CookieOrigin origin) {
122 if (cookie == null) {
123 throw new IllegalArgumentException("Cookie may not be null");
126 throw new IllegalArgumentException("Cookie origin may not be null");
129 if (!handler.match(cookie, origin)) {