Package io.undertow.util
Class Cookies
- java.lang.Object
-
- io.undertow.util.Cookies
-
public class Cookies extends Object
Class that contains utility methods for dealing with cookies.- Author:
- Stuart Douglas, Andre Dietisheim, Richard Opalka
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Map<String,Cookie>
parseRequestCookies(int maxCookies, boolean allowEqualInValue, List<String> cookies)
Deprecated.useparseRequestCookies(int, boolean, List, Set)
insteadstatic void
parseRequestCookies(int maxCookies, boolean allowEqualInValue, List<String> cookies, Set<Cookie> parsedCookies)
static Cookie
parseSetCookieHeader(String headerValue)
Parses a "Set-Cookie:" response header value into its cookie representation.
-
-
-
Field Detail
-
DOMAIN
public static final String DOMAIN
- See Also:
- Constant Field Values
-
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseSetCookieHeader
public static Cookie parseSetCookieHeader(String headerValue)
Parses a "Set-Cookie:" response header value into its cookie representation. The header value is parsed according to the syntax that's defined in RFC2109:set-cookie = "Set-Cookie:" cookies cookies = 1#cookie cookie = NAME "=" VALUE *(";" cookie-av) NAME = attr VALUE = value cookie-av = "Comment" "=" value | "Domain" "=" value | "Max-Age" "=" value | "Path" "=" value | "Secure" | "Version" "=" 1*DIGIT
-
parseRequestCookies
@Deprecated public static Map<String,Cookie> parseRequestCookies(int maxCookies, boolean allowEqualInValue, List<String> cookies)
Deprecated.useparseRequestCookies(int, boolean, List, Set)
instead/** Parses the cookies from a list of "Cookie:" header values. The cookie header values are parsed according to RFC2109 that defines the following syntax:cookie = "Cookie:" cookie-version 1*((";" | ",") cookie-value) cookie-value = NAME "=" VALUE [";" path] [";" domain] cookie-version = "$Version" "=" value NAME = attr VALUE = value path = "$Path" "=" value domain = "$Domain" "=" value
-
-