Class ServerCookie
java.lang.Object
org.broadleafcommerce.common.security.util.ServerCookie
This is a modified version of the ServerCookie implementation taken from
the Apache Tomcat source. This class allows Broadleaf to properly construct
cookies for different browsers and include the httpOnly protection as well.
- Author:
- jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
If set to false, we don't use the IE6/7 Max-Age/Expires work aroundstatic final boolean
If set to true, we parse cookies according to the servlet spec, -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
alreadyQuoted
(String value) static void
appendCookieValue
(StringBuffer headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean isHttpOnly) static boolean
containsCTL
(String value, int version) static boolean
static boolean
static boolean
static boolean
static int
maybeQuote2
(int version, StringBuffer buf, String value) static int
maybeQuote2
(int version, StringBuffer buf, String value, boolean allowVersionSwitch) static int
maybeQuote2
(int version, StringBuffer buf, String value, String literals, boolean allowVersionSwitch)
-
Field Details
-
STRICT_SERVLET_COMPLIANCE
public static final boolean STRICT_SERVLET_COMPLIANCEIf set to true, we parse cookies according to the servlet spec,- See Also:
-
ALWAYS_ADD_EXPIRES
public static final boolean ALWAYS_ADD_EXPIRESIf set to false, we don't use the IE6/7 Max-Age/Expires work around- See Also:
-
-
Constructor Details
-
ServerCookie
public ServerCookie()
-
-
Method Details
-
appendCookieValue
-
maybeQuote2
-
maybeQuote2
public static int maybeQuote2(int version, StringBuffer buf, String value, boolean allowVersionSwitch) -
maybeQuote2
public static int maybeQuote2(int version, StringBuffer buf, String value, String literals, boolean allowVersionSwitch) -
containsCTL
-
alreadyQuoted
-
isToken
-
isToken
-
isToken2
-
isToken2
-