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) }