Top Fields Constructors Methods
io.netty.handler.codec.http

public final Class CookieDecoder

extends Object
Class Inheritance
Annotations
@Deprecated
Static Imports
io.netty.handler.codec.http.CookieUtil.firstInvalidCookieNameOctet, .CookieUtil.firstInvalidCookieValueOctet, .CookieUtil.unwrapValue

Deprecated

Use io.netty.handler.codec.http.cookie.ClientCookieDecoder or io.netty.handler.codec.http.cookie.ServerCookieDecoder instead. Decodes an HTTP header value into Cookies. This decoder can decode the HTTP cookie version 0, 1, and 2.

HttpRequest req = ...;
String value = req.getHeader("Cookie");
Set<Cookie> cookies = CookieDecoder.decode(value);

See Also
io.netty.handler.codec.http.cookie.ClientCookieDecoder, io.netty.handler.codec.http.cookie.ServerCookieDecoder

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final CookieDecoder
LAX

Deprecated as a consequence of CookieDecoder being deprecated.
private final InternalLogger
private static final String
private static final CookieDecoder
STRICT

Deprecated as a consequence of CookieDecoder being deprecated.
private final boolean
private static final String

Constructor Summary

AccessConstructor and Description
private
CookieDecoder(boolean strict)

Method Summary

Modifier and TypeMethod and Description
public static Set<Cookie>
decode(String header)

public static Set<Cookie>
decode(String header, boolean strict)

private Set<Cookie>

Returns:

the decoded Cookies
doDecode
(String header)

Decodes the specified HTTP header value into Cookies.

private static void
extractKeyValuePairs(final String header, final List<String> names, final List<String> values)

private DefaultCookie
initCookie(String name, String value)

Deprecated as a consequence of DefaultCookie being deprecated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMMENTback to summary
private static final String COMMENT
COMMENTURLback to summary
private static final String COMMENTURL
DISCARDback to summary
private static final String DISCARD
LAXback to summary
private static final CookieDecoder LAX

Deprecated

as a consequence of CookieDecoder being deprecated. See corresponding docs for further information.

loggerback to summary
private final InternalLogger logger
PORTback to summary
private static final String PORT
STRICTback to summary
private static final CookieDecoder STRICT

Deprecated

as a consequence of CookieDecoder being deprecated. See corresponding docs for further information.

strictback to summary
private final boolean strict
VERSIONback to summary
private static final String VERSION

Constructor Detail

CookieDecoderback to summary
private CookieDecoder(boolean strict)

Method Detail

decodeback to summary
public static Set<Cookie> decode(String header)
decodeback to summary
public static Set<Cookie> decode(String header, boolean strict)
doDecodeback to summary
private Set<Cookie> doDecode(String header)

Decodes the specified HTTP header value into Cookies.

Returns:Set<Cookie>

the decoded Cookies

extractKeyValuePairsback to summary
private static void extractKeyValuePairs(final String header, final List<String> names, final List<String> values)
initCookieback to summary
private DefaultCookie initCookie(String name, String value)

Deprecated

as a consequence of DefaultCookie being deprecated. See corresponding docs for further information.