Constructs cookies from set-cookie or set-cookie2 header string.
RFC 2965 section 3.2.2 set-cookie2 syntax indicates that one header line
may contain more than one cookie definitions, so this is a static
utility method instead of another constructor.
Returns:
a List of cookie parsed from header line string
Parameters:
-
header - a
String specifying the set-cookie header.
The header should start with "set-cookie", or "set-cookie2"
token; or it should have no leading token at all.
Throws:
-
IllegalArgumentException - if header string violates the cookie
specification's syntax, or the cookie
name contains llegal characters, or
the cookie name is one of the tokens
reserved for use by the cookie protocol
-
NullPointerException - if the header string is
null