Class CookieProcessorBase
java.lang.Object
org.apache.tomcat.util.http.CookieProcessorBase
- All Implemented Interfaces:
CookieProcessor
- Direct Known Subclasses:
Rfc6265CookieProcessor
Base implementation of
CookieProcessor.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringA date far in the past used to expire cookies.protected static final ThreadLocal<DateFormat> Thread-local date format for cookie dates. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current cookiesWithoutEquals setting as a string.protected CookiesWithoutEqualsGet the current cookiesWithoutEquals setting as an enum.booleanShould thePartitionedattribute be added by default to cookies created for this web application.Get the current sameSiteCookies setting.voidsetCookiesWithoutEquals(String cookiesWithoutEquals) Set the cookiesWithoutEquals setting.voidsetPartitioned(boolean partitioned) Configure whether thePartitionedattribute should be added by default to cookies created for this web application.voidsetSameSiteCookies(String sameSiteCookies) Set the sameSiteCookies setting.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CookieProcessor
generateHeader, getCharset, parseCookieHeader
-
Field Details
-
COOKIE_DATE_FORMAT
Thread-local date format for cookie dates. -
ANCIENT_DATE
A date far in the past used to expire cookies.
-
-
Constructor Details
-
CookieProcessorBase
public CookieProcessorBase()Default constructor.
-
-
Method Details
-
getCookiesWithoutEquals
Get the current cookiesWithoutEquals setting as a string.- Returns:
- The cookiesWithoutEquals value
-
getCookiesWithoutEqualsInternal
Get the current cookiesWithoutEquals setting as an enum.- Returns:
- The cookiesWithoutEquals value
-
setCookiesWithoutEquals
Set the cookiesWithoutEquals setting.- Parameters:
cookiesWithoutEquals- The new cookiesWithoutEquals value
-
getSameSiteCookies
Get the current sameSiteCookies setting.- Returns:
- The sameSiteCookies value
-
setSameSiteCookies
Set the sameSiteCookies setting.- Parameters:
sameSiteCookies- The new sameSiteCookies value
-
getPartitioned
public boolean getPartitioned()Should thePartitionedattribute be added by default to cookies created for this web application.The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.
- Returns:
trueif thePartitionedattribute should be added by default to cookies created for this web application, otherwisefalse
-
setPartitioned
public void setPartitioned(boolean partitioned) Configure whether thePartitionedattribute should be added by default to cookies created for this web application.The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.
- Parameters:
partitioned-trueif thePartitionedattribute should be added by default to cookies created for this web application, otherwisefalse
-