Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.

Commit cacc910

Browse files
sdg9joeferraro
authored andcommitted
Android split cookies only on first instance of = (#31)
Currently the cookie string (e.g. cookieName=value) will be split on every instance of = and only the first two items will be used. This adds support for cookies with '=' in their value.
1 parent 56ff134 commit cacc910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/psykar/cookiemanager/CookieManagerModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void get(String url, Callback callback) throws URISyntaxException, IOExce
6262
if (cookieList != null) {
6363
String[] cookies = cookieList.get(0).split(";");
6464
for (int i = 0; i < cookies.length; i++) {
65-
String[] cookie = cookies[i].split("=");
65+
String[] cookie = cookies[i].split("=", 2);
6666
if(cookie.length > 1) {
6767
map.putString(cookie[0].trim(), cookie[1]);
6868
}

0 commit comments

Comments
 (0)