java.lang.Object
org.htmlunit.http.CookieParser
Cookie parser based on the HTTP cookie specification.
- RFC 2109 and RFC 2965 (versioned cookies)
- Netscape cookie specification
- Cookie attributes: Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite
- Author:
- Ronald Brill
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionparseCookie(String cookieString, URL pageUrl, BrowserVersion browserVersion) Parses a cookie string and returns a list of Cookie objects.
-
Field Details
-
EMPTY_COOKIE_NAME
The cookie name used for cookies with no name.- See Also:
-
LOCAL_FILESYSTEM_DOMAIN
Workaround for domain of local files.- See Also:
-
-
Method Details
-
parseCookie
public static List<Cookie> parseCookie(String cookieString, URL pageUrl, BrowserVersion browserVersion) throws MalformedCookieException Parses a cookie string and returns a list of Cookie objects.- Parameters:
cookieString- the string to parsepageUrl- the page url as rootbrowserVersion- theBrowserVersion- Returns:
- a list of
Cookie's - Throws:
MalformedCookieException- in case the cookie does not conform to the spec
-