This commit is contained in:
Horis 2023-10-13 13:35:22 +08:00
parent 314619e014
commit 2ab772387e

View File

@ -84,8 +84,8 @@ object CookieStore : CookieManagerInterface {
}
val pairArray = cookie.split(semicolonRegex).dropLastWhile { it.isEmpty() }.toTypedArray()
for (pair in pairArray) {
val pairs = pair.split(equalsRegex).dropLastWhile { it.isEmpty() }.toTypedArray()
if (pairs.size == 1) {
val pairs = pair.split(equalsRegex, 2).dropLastWhile { it.isEmpty() }.toTypedArray()
if (pairs.size <= 1) {
continue
}
val key = pairs[0].trim { it <= ' ' }