pull/2051/head
kunfei 2 years ago
parent 6d4f971407
commit 8150b47fae
  1. 13
      app/src/main/java/io/legado/app/help/http/CookieStore.kt

@ -86,16 +86,11 @@ object CookieStore : CookieManager {
return null return null
} }
val builder = StringBuilder() val builder = StringBuilder()
for (key in cookieMap.keys) { cookieMap.keys.forEachIndexed { index, key ->
val value = cookieMap[key] if (index > 0) builder.append("; ")
if (value?.isNotBlank() == true) { builder.append(key).append("=").append(cookieMap[key])
builder.append(key)
.append("=")
.append(value)
.append(";")
} }
} return builder.toString()
return builder.deleteCharAt(builder.lastIndexOf(";")).toString()
} }
fun clear() { fun clear() {

Loading…
Cancel
Save