From 2ab772387ee00d0a84c432295c13aaabab641d74 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Fri, 13 Oct 2023 13:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/http/CookieStore.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/CookieStore.kt b/app/src/main/java/io/legado/app/help/http/CookieStore.kt index 5292298c3611..20333f4ae03e 100644 --- a/app/src/main/java/io/legado/app/help/http/CookieStore.kt +++ b/app/src/main/java/io/legado/app/help/http/CookieStore.kt @@ -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 <= ' ' }