Merge pull request #1295 from ag2s20150909/master

Update CronetInterceptor.kt
pull/1296/head
kunfei 3 years ago committed by GitHub
commit 74fe52fa0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt

@ -28,7 +28,7 @@ class CronetInterceptor(private val cookieJar: CookieJar?) : Interceptor {
response response
} catch (e: Exception) { } catch (e: Exception) {
//遇到Cronet处理有问题时的情况,如证书过期等等,回退到okhttp处理 //遇到Cronet处理有问题时的情况,如证书过期等等,回退到okhttp处理
if (e.message.toString().contains("ERR_CERT_DATE_INVALID", true)) { if (e.message.toString().contains("ERR_CERT_", true)) {
chain.proceed(original) chain.proceed(original)
} else { } else {
throw e throw e
@ -65,4 +65,4 @@ class CronetInterceptor(private val cookieJar: CookieJar?) : Interceptor {
return sb.toString() return sb.toString()
} }
} }

Loading…
Cancel
Save