diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt
index d1141276b..97a43f359 100644
--- a/app/src/main/java/io/legado/app/help/AppConfig.kt
+++ b/app/src/main/java/io/legado/app/help/AppConfig.kt
@@ -231,8 +231,8 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
private fun getPrefUserAgent(): String {
val ua = appCtx.getPrefString(PreferKey.userAgent)
if (ua.isNullOrBlank()) {
- return "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
- }
+ return "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
+ }
return ua
}
}
diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt
index 8229f46cd..b6d50f116 100644
--- a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt
+++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt
@@ -41,7 +41,11 @@ fun buildRequest(request: Request, callback: UrlRequest.Callback): UrlRequest {
}
val headers: Headers = request.headers
headers.forEachIndexed { index, _ ->
- requestBuilder.addHeader(headers.name(index), headers.value(index))
+ val name = headers.name(index)
+ if (!name.equals("Keep-Alive", true)) {
+ requestBuilder.addHeader(name, headers.value(index))
+ }
+
}
val requestBody = request.body
@@ -60,6 +64,5 @@ fun buildRequest(request: Request, callback: UrlRequest.Callback): UrlRequest {
}
return requestBuilder.build()
-
}
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
index 2c950a5b6..99b392d5a 100644
--- a/app/src/main/res/xml/network_security_config.xml
+++ b/app/src/main/res/xml/network_security_config.xml
@@ -3,4 +3,11 @@
+
+
+
+
+
+
+
\ No newline at end of file