-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
When cookie-value contains "=" character(in my case, session-cookies like that are generated by the Play framework, which generates session-cookies like that:
PLAY_SESSION=<<session_id>>-connected=<>&websockid=<<socket_id>>;), this code fails:
private static void setCookie(Map<String, String> cookies, String host, String path, boolean secure) {
String url = String.format("%s://%s%s", secure ? "https" : "http", host, path);
String cookie = CookieManager.getInstance().getCookie(url);
if (cookie != null) {
for (String c : cookie.split(";")) {
String[] pair = c.split("=");
if (pair.length == 2) {
cookies.put(pair[0].trim(), pair[1].trim());
}
}
}
}
Since pair.length won't be 2. Suggested PR:
#35
fixes it.
Metadata
Metadata
Assignees
Labels
No labels