pull/37/head
kunfei 5 years ago
parent b934c7cb70
commit e035fd06b8
  1. 2
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  2. 2
      app/src/main/java/io/legado/app/help/storage/OldRule.kt

@ -68,7 +68,7 @@ data class BookSource(
fun getHeaderMap(): Map<String, String> {
val headerMap = HashMap<String, String>()
headerMap["User-Agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent
headerMap["user-agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent
header?.let {
GSON.fromJsonObject<Map<String, String>>(header)?.let {
headerMap.putAll(it)

@ -131,7 +131,7 @@ object OldRule {
private fun uaToHeader(ua: String?): String? {
if (ua.isNullOrEmpty()) return null
val map = mapOf(Pair("User-Agent", ua))
val map = mapOf(Pair("user-agent", ua))
return GSON.toJson(map)
}

Loading…
Cancel
Save