From e5e60a6f1991f36b36d7e4cfc6b8b03e66a7a051 Mon Sep 17 00:00:00 2001 From: ag2s20150909 Date: Sat, 4 Sep 2021 11:53:02 +0800 Subject: [PATCH] Update CronetInterceptor.kt --- .../java/io/legado/app/help/http/cronet/CronetInterceptor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt index ccd63d415..fc45331ff 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt @@ -28,7 +28,7 @@ class CronetInterceptor(private val cookieJar: CookieJar?) : Interceptor { response } catch (e: Exception) { //遇到Cronet处理有问题时的情况,如证书过期等等,回退到okhttp处理 - if (e.message.toString().contains("ERR_CERT_DATE_INVALID", true)) { + if (e.message.toString().contains("ERR_CERT_", true)) { chain.proceed(original) } else { throw e @@ -65,4 +65,4 @@ class CronetInterceptor(private val cookieJar: CookieJar?) : Interceptor { return sb.toString() } -} \ No newline at end of file +}