org.broadleafcommerce.common.security.util
Class ServerCookie
java.lang.Object
org.broadleafcommerce.common.security.util.ServerCookie
public class ServerCookie
- extends Object
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 |
static boolean |
ALWAYS_ADD_EXPIRES
If set to false, we don't use the IE6/7 Max-Age/Expires work around |
static boolean |
STRICT_SERVLET_COMPLIANCE
If set to true, we parse cookies according to the servlet spec, |
|
Method Summary |
static 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 |
isToken(String value)
|
static boolean |
isToken(String value,
String literals)
|
static boolean |
isToken2(String value)
|
static boolean |
isToken2(String value,
String literals)
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRICT_SERVLET_COMPLIANCE
public static final boolean STRICT_SERVLET_COMPLIANCE
- If set to true, we parse cookies according to the servlet spec,
- See Also:
- Constant Field Values
ALWAYS_ADD_EXPIRES
public static final boolean ALWAYS_ADD_EXPIRES
- If set to false, we don't use the IE6/7 Max-Age/Expires work around
- See Also:
- Constant Field Values
ServerCookie
public ServerCookie()
appendCookieValue
public static void appendCookieValue(StringBuffer headerBuf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure,
boolean isHttpOnly)
maybeQuote2
public static int maybeQuote2(int version,
StringBuffer buf,
String value)
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
public static boolean containsCTL(String value,
int version)
alreadyQuoted
public static boolean alreadyQuoted(String value)
isToken
public static boolean isToken(String value)
isToken
public static boolean isToken(String value,
String literals)
isToken2
public static boolean isToken2(String value)
isToken2
public static boolean isToken2(String value,
String literals)
Copyright © 2013. All Rights Reserved.