fix(AnalyzeUrl): skip analyze when mUrl is DataURL

pull/2158/head
Xwite 2 years ago
parent 05581c30c3
commit 185f25dd6b
  1. 18
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -72,18 +72,16 @@ class AnalyzeUrl(
private val enabledCookieJar = source?.enabledCookieJar ?: false private val enabledCookieJar = source?.enabledCookieJar ?: false
init { init {
if (!mUrl.isDataUrl()) { val urlMatcher = paramPattern.matcher(baseUrl)
val urlMatcher = paramPattern.matcher(baseUrl) if (urlMatcher.find()) baseUrl = baseUrl.substring(0, urlMatcher.start())
if (urlMatcher.find()) baseUrl = baseUrl.substring(0, urlMatcher.start()) (headerMapF ?: source?.getHeaderMap(true))?.let {
(headerMapF ?: source?.getHeaderMap(true))?.let { headerMap.putAll(it)
headerMap.putAll(it) if (it.containsKey("proxy")) {
if (it.containsKey("proxy")) { proxy = it["proxy"]
proxy = it["proxy"] headerMap.remove("proxy")
headerMap.remove("proxy")
}
} }
initUrl()
} }
initUrl()
} }
/** /**

Loading…
Cancel
Save