Class ClientCookieDecoder

java.lang.Object
play.core.cookie.encoding.ClientCookieDecoder

public final class ClientCookieDecoder extends Object
A RFC6265 compliant cookie decoder to be used client side.

It will store the way the raw value was wrapped in Cookie.setWrap(boolean) so it can be eventually sent back to the Origin server as is.

See Also:
  • Field Details

    • STRICT

      public static final ClientCookieDecoder STRICT
      Strict encoder that validates that name and value chars are in the valid scope defined in RFC6265
    • LAX

      public static final ClientCookieDecoder LAX
      Lax instance that doesn't validate name and value
  • Method Details

    • decode

      public Cookie decode(String header)
      Decodes the specified Set-Cookie HTTP header value into a Cookie.
      Parameters:
      header - the Set-Cookie header.
      Returns:
      the decoded Cookie
    • initCookie

      protected DefaultCookie initCookie(String header, int nameBegin, int nameEnd, int valueBegin, int valueEnd)