org.apache.tomcat.util.http
public class ServerCookie extends Object implements Serializable
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, |
Constructor Summary | |
---|---|
ServerCookie() |
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 | checkName(String name) |
static boolean | containsCTL(String value, int version) |
MessageBytes | getComment() |
String | getCookieHeaderName()
Return the header name to set the cookie, based on cookie version. |
static String | getCookieHeaderName(int version)
Return the header name to set the cookie, based on cookie version. |
MessageBytes | getDomain() |
int | getMaxAge() |
MessageBytes | getName() |
MessageBytes | getPath() |
boolean | getSecure() |
MessageBytes | getValue() |
int | getVersion() |
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)
Quotes values using rules that vary depending on Cookie version. |
static int | maybeQuote2(int version, StringBuffer buf, String value, boolean allowVersionSwitch) |
static int | maybeQuote2(int version, StringBuffer buf, String value, String literals, boolean allowVersionSwitch) |
void | recycle() |
void | setMaxAge(int expiry) |
void | setSecure(boolean flag) |
void | setVersion(int v) |
String | toString() |
static void | unescapeDoubleQuotes(ByteChunk bc)
Unescapes any double quotes in the given cookie value.
|
Deprecated: - Not used
Parameters: version buf value
Parameters: bc The cookie value to modify