From e035fd06b8eaaef07094119f6bf4c3dec218796c Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 10 Oct 2019 11:13:32 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/entities/BookSource.kt | 2 +- app/src/main/java/io/legado/app/help/storage/OldRule.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/BookSource.kt b/app/src/main/java/io/legado/app/data/entities/BookSource.kt index 6a373bdef..ff4eaa533 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookSource.kt @@ -68,7 +68,7 @@ data class BookSource( fun getHeaderMap(): Map { val headerMap = HashMap() - headerMap["User-Agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent + headerMap["user-agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent header?.let { GSON.fromJsonObject>(header)?.let { headerMap.putAll(it) diff --git a/app/src/main/java/io/legado/app/help/storage/OldRule.kt b/app/src/main/java/io/legado/app/help/storage/OldRule.kt index 7418ea6c6..135d604b9 100644 --- a/app/src/main/java/io/legado/app/help/storage/OldRule.kt +++ b/app/src/main/java/io/legado/app/help/storage/OldRule.kt @@ -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) }