Lines Matching refs:cookie

40  * policy decisions on cookie acceptance/rejection.
42 * <p> The HTTP cookie management in java.net package looks like:
64 * CookieHandler is at the core of cookie management. User can call
70 * or not one cookie should be accepted and put into cookie store. User can use
76 * CookieStore is the place where any accepted HTTP cookie is stored in.
89 * <p>There're various ways user can hook up his own HTTP cookie management behavior, e.g.
130 * Create a new cookie manager.
132 * <p>This constructor will create new cookie manager with default
133 * cookie store and accept policy. The effect is same as
142 * Create a new cookie manager with specified cookie store and cookie policy.
144 * @param store a <tt>CookieStore</tt> to be used by cookie manager.
145 * if <tt>null</tt>, cookie manager will use a default one,
148 * to be used by cookie manager as policy callback.
155 // use default cookie policy if not specify one
171 * To set the cookie policy of this cookie manager.
174 * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
175 * can call this method to set another cookie policy.
177 * @param cookiePolicy the cookie policy. Can be <tt>null</tt>, which
178 * has no effects on current cookie policy.
186 * To retrieve current cookie store.
188 * @return the cookie store currently used by cookie manager.
206 // if there's no default CookieStore, no way for us to get any cookie
216 for (HttpCookie cookie : cookieJar.get(uri)) {
220 if (pathMatches(path, cookie.getPath()) &&
221 (secureLink || !cookie.getSecure())) {
223 if (cookie.isHttpOnly()) {
230 String ports = cookie.getPortlist();
237 cookies.add(cookie);
240 cookies.add(cookie);
263 // if there's no default CookieStore, no need to remember any cookie
289 logger.severe("Invalid cookie for " + uri + ": " + headerValue);
292 for (HttpCookie cookie : cookies) {
293 if (cookie.getPath() == null) {
305 cookie.setPath(path);
312 if (cookie.getDomain() == null) {
313 cookie.setDomain(uri.getHost());
315 String ports = cookie.getPortlist();
324 cookie.setPortlist("" + port );
325 if (shouldAcceptInternal(uri, cookie)) {
326 cookieJar.add(uri, cookie);
333 shouldAcceptInternal(uri, cookie)) {
334 cookieJar.add(uri, cookie);
338 if (shouldAcceptInternal(uri, cookie)) {
339 cookieJar.add(uri, cookie);
344 // invalid set-cookie header string
354 // to determine whether or not accept this cookie
355 private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) {
357 return policyCallback.shouldAccept(uri, cookie);
413 for (HttpCookie cookie : cookies) {
414 // Netscape cookie spec and RFC 2965 have different format of Cookie
418 if (cookies.indexOf(cookie) == 0 && cookie.getVersion() > 0) {
422 cookieHeader.add(cookie.toString());