Module org.glassfish.grizzly.http
Package org.glassfish.grizzly.http.util
Class CookieHeaderGenerator
java.lang.Object
org.glassfish.grizzly.http.util.CookieHeaderGenerator
Cookie header generator based on RFC6265
- Author:
- The Tomcat team, Arjan Tijms
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringstatic final Stringprotected static final ThreadLocal<DateFormat>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateHeader(String name, String value, int maxAge, String domain, String path, boolean isSecure, boolean isHttpOnly, Map<String, String> attributes) static booleanIs the provided String a token as per RFC 7230?
Note: token = 1 * tchar (RFC 7230)
Since a token requires at least 1 tchar,nulland the empty string ("") are not considered to be valid tokens.
-
Field Details
-
COOKIE_COMMENT_ATTR
- See Also:
-
COOKIE_DOMAIN_ATTR
- See Also:
-
COOKIE_MAX_AGE_ATTR
- See Also:
-
COOKIE_PATH_ATTR
- See Also:
-
COOKIE_SECURE_ATTR
- See Also:
-
COOKIE_HTTP_ONLY_ATTR
- See Also:
-
COOKIE_DATE_FORMAT
-
ANCIENT_DATE
-
-
Constructor Details
-
CookieHeaderGenerator
public CookieHeaderGenerator()
-
-
Method Details
-
generateHeader
-
isToken
Is the provided String a token as per RFC 7230?
Note: token = 1 * tchar (RFC 7230)
Since a token requires at least 1 tchar,nulland the empty string ("") are not considered to be valid tokens.- Parameters:
string- The string to test- Returns:
trueif the string is a valid token, otherwisefalse
-