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 booleanIf set to false, we don't use the IE6/7 Max-Age/Expires work aroundstatic final booleanIf set to true, we parse cookies according to the servlet spec, -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanalreadyQuoted(String value) static voidappendCookieValue(StringBuffer headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean isHttpOnly) static booleancontainsCTL(String value, int version) static booleanstatic booleanstatic booleanstatic booleanstatic intmaybeQuote2(int version, StringBuffer buf, String value) static intmaybeQuote2(int version, StringBuffer buf, String value, boolean allowVersionSwitch) static intmaybeQuote2(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
-