Interface SetCookieParser

All Known Implementing Classes:
RFC6265SetCookieParser

public interface SetCookieParser

A parser for Set-Cookie header values.

Differently from other HTTP headers, Set-Cookie cannot be multi-valued with values separated by commas, because cookies supports the Expires attribute whose value is an RFC 1123 date that contains a comma.

  • Method Details

    • parse

      HttpCookie parse(String setCookieValue)

      Returns an HttpCookie obtained by parsing the given Set-Cookie value.

      Returns null if the Set-Cookie value cannot be parsed due to syntax errors.

      Parameters:
      setCookieValue - the Set-Cookie value to parse
      Returns:
      the parse HttpCookie or null
    • newInstance

      static SetCookieParser newInstance()
      Returns:
      a new instance of the default SetCookieParser