public abstract class CookieProcessorBase extends Object implements CookieProcessor
Modifier and Type | Field and Description |
---|---|
protected static String |
ANCIENT_DATE |
protected static ThreadLocal<DateFormat> |
COOKIE_DATE_FORMAT |
Constructor and Description |
---|
CookieProcessorBase() |
Modifier and Type | Method and Description |
---|---|
String |
generateHeader(Cookie cookie,
HttpServletRequest request)
Deprecated.
This implementation calls the deprecated
CookieProcessor.generateHeader(Cookie) method. Implementors should
not rely on this method as it is present only for
transitional compatibility and will be removed in Tomcat 9. |
SameSiteCookies |
getSameSiteCookies() |
void |
setSameSiteCookies(String sameSiteCookies) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateHeader, getCharset, parseCookieHeader
protected static final ThreadLocal<DateFormat> COOKIE_DATE_FORMAT
protected static final String ANCIENT_DATE
public SameSiteCookies getSameSiteCookies()
public void setSameSiteCookies(String sameSiteCookies)
@Deprecated public String generateHeader(Cookie cookie, HttpServletRequest request)
CookieProcessor.generateHeader(Cookie)
method. Implementors should
not rely on this method as it is present only for
transitional compatibility and will be removed in Tomcat 9.Set-Cookie
HTTP header value for the given Cookie.
This method receives as parameter the servlet request so that it can make
decisions based on request properties. One such use-case is decide if the
SameSite attribute should be added to the cookie based on the User-Agent
or other request header because there are browser versions incompatible
with the SameSite attribute. This is described by the
Chromium project.generateHeader
in interface CookieProcessor
cookie
- The cookie for which the header will be generatedrequest
- The servlet requestCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.