@Override public void addResponseCookie(Cookie cookie) { getResponse().cookie(cookie.getPath(), cookie.getDomain(), cookie.getName(), cookie.getValue(), cookie.getMaxAge(), cookie.isSecure() ); javax.servlet.http.Cookie addedCookie = getResponse().getCookie(cookie.getName()); addedCookie.setHttpOnly(cookie.isHttpOnly()); addedCookie.setComment(cookie.getComment()); }
@Override public void addResponseCookie(Cookie cookie) { CommonHelper.assertNotNull("cookie", cookie); // Note: expiry is not in servlet and is meant to be superseeded by // max-age, so we simply make it null NewCookie c = new NewCookie(cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getDomain(), cookie.getVersion(), cookie.getComment(), cookie.getMaxAge(), null, cookie.isSecure(), cookie.isHttpOnly()); getAbortBuilder().cookie(c); getResponseHolder().addResponseCookie(c); }
@Override public void addResponseCookie(final Cookie cookie) { final CookieImpl newCookie = new CookieImpl(cookie.getName(), cookie.getValue()); newCookie.setComment(cookie.getComment()); newCookie.setDomain(cookie.getDomain()); newCookie.setPath(cookie.getPath()); newCookie.setMaxAge(cookie.getMaxAge() < 0 ? null : cookie.getMaxAge()); newCookie.setSecure(cookie.isSecure()); newCookie.setHttpOnly(cookie.isHttpOnly()); exchange.setResponseCookie(newCookie); }