diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 561e3a320..3c75a20b3 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -191,6 +191,7 @@ class AnalyzeUrl( ?.let { headerMap.putAll(it) } } } + headerMap[UA_NAME] = headerMap[UA_NAME] ?: userAgent charset = option.charset body = if (option.body is String) { option.body @@ -352,7 +353,6 @@ class AnalyzeUrl( if (cookie.isNotEmpty()) { headerMap["Cookie"] += cookie } - headerMap[UA_NAME] = headerMap[UA_NAME] ?: userAgent return if (fieldMap.isEmpty()) { HttpHelper.getBytes(url, mapOf(), headerMap) } else {