/** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired according to the current system time. * * @see #purgeExpiredCookies(java.util.Date) * */ public synchronized boolean purgeExpiredCookies() { LOG.trace("enter HttpState.purgeExpiredCookies()"); return purgeExpiredCookies(new Date()); }
/** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired according to the current system time. * * @see #purgeExpiredCookies(java.util.Date) * */ public synchronized boolean purgeExpiredCookies() { LOG.trace("enter HttpState.purgeExpiredCookies()"); return purgeExpiredCookies(new Date()); }
/** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired according to the current system time. * * @see #purgeExpiredCookies(java.util.Date) * */ public synchronized boolean purgeExpiredCookies() { LOG.trace("enter HttpState.purgeExpiredCookies()"); return purgeExpiredCookies(new Date()); }
/** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired according to the current system time. * * @see #purgeExpiredCookies(java.util.Date) * */ public synchronized boolean purgeExpiredCookies() { LOG.trace("enter HttpState.purgeExpiredCookies()"); return purgeExpiredCookies(new Date()); }
/** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired according to the current system time. * * @see #purgeExpiredCookies(java.util.Date) * */ public synchronized boolean purgeExpiredCookies() { LOG.trace("enter HttpState.purgeExpiredCookies()"); return purgeExpiredCookies(new Date()); }
@Override public void processMessageToMatchSession(HttpMessage message, WebSession session) throws UnsupportedWebSessionException { if (session.getHttpState() == null) return; session.getHttpState().purgeExpiredCookies(); // Remove any cookies that will be added by the HttpState from the message List<HttpCookie> cookies = message.getRequestHeader().getHttpCookies(); Iterator<HttpCookie> it = cookies.iterator(); while (it.hasNext()) { HttpCookie c = it.next(); for (Cookie sc : session.getHttpState().getCookies()) if (sc.getName().equals(c.getName())) { it.remove(); break; } } message.setCookies(cookies); }