Class ServerCookieDecoder
- java.lang.Object
-
- io.netty.handler.codec.http.cookie.CookieDecoder
-
- io.netty.handler.codec.http.cookie.ServerCookieDecoder
-
public final class ServerCookieDecoder extends CookieDecoder
A RFC6265 compliant cookie decoder to be used server side. Only name and value fields are expected, so old fields are not populated (path, domain, etc). Old RFC2965 cookies are still supported, old fields will simply be ignored.- See Also:
ServerCookieEncoder
-
-
Field Summary
Fields Modifier and Type Field Description static ServerCookieDecoderLAXLax instance that doesn't validate name and valueprivate static java.lang.StringRFC2965_DOMAINprivate static java.lang.StringRFC2965_PATHprivate static java.lang.StringRFC2965_PORTprivate static java.lang.StringRFC2965_VERSIONstatic ServerCookieDecoderSTRICTStrict encoder that validates that name and value chars are in the valid scope defined in RFC6265
-
Constructor Summary
Constructors Modifier Constructor Description privateServerCookieDecoder(boolean strict)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Cookie>decode(java.lang.String header)Decodes the specified Set-Cookie HTTP header value into aCookie.private voiddecode(java.util.Collection<? super Cookie> cookies, java.lang.String header)Decodes the specified Set-Cookie HTTP header value into aCookie.java.util.List<Cookie>decodeAll(java.lang.String header)Decodes the specified Set-Cookie HTTP header value into aCookie.-
Methods inherited from class io.netty.handler.codec.http.cookie.CookieDecoder
initCookie
-
-
-
-
Field Detail
-
RFC2965_VERSION
private static final java.lang.String RFC2965_VERSION
- See Also:
- Constant Field Values
-
RFC2965_PATH
private static final java.lang.String RFC2965_PATH
- See Also:
- Constant Field Values
-
RFC2965_DOMAIN
private static final java.lang.String RFC2965_DOMAIN
- See Also:
- Constant Field Values
-
RFC2965_PORT
private static final java.lang.String RFC2965_PORT
- See Also:
- Constant Field Values
-
STRICT
public static final ServerCookieDecoder STRICT
Strict encoder that validates that name and value chars are in the valid scope defined in RFC6265
-
LAX
public static final ServerCookieDecoder LAX
Lax instance that doesn't validate name and value
-
-
Method Detail
-
decodeAll
public java.util.List<Cookie> decodeAll(java.lang.String header)
Decodes the specified Set-Cookie HTTP header value into aCookie. Unlikedecode(String), this includes all cookie values present, even if they have the same name.- Returns:
- the decoded
Cookie
-
decode
public java.util.Set<Cookie> decode(java.lang.String header)
Decodes the specified Set-Cookie HTTP header value into aCookie.- Returns:
- the decoded
Cookie
-
-