mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
152dc4e3b8
commit
1d6ce30113
@ -10,6 +10,7 @@ import com.bumptech.glide.util.ContentLengthInputStream
|
||||
import com.bumptech.glide.util.Preconditions
|
||||
import io.legado.app.data.entities.BaseSource
|
||||
import io.legado.app.exception.NoStackTraceException
|
||||
import io.legado.app.help.http.CookieManager.cookieJarHeader
|
||||
import io.legado.app.help.http.addHeaders
|
||||
import io.legado.app.help.http.okHttpClient
|
||||
import io.legado.app.help.source.SourceHelp
|
||||
@ -56,6 +57,9 @@ class OkHttpStreamFetcher(private val url: GlideUrl, private val options: Option
|
||||
source?.getHeaderMap(true)?.let {
|
||||
headerMap.putAll(it)
|
||||
}
|
||||
if (source?.enabledCookieJar == true) {
|
||||
headerMap[cookieJarHeader] = "1"
|
||||
}
|
||||
}
|
||||
headerMap.putAll(url.headers)
|
||||
requestBuilder.addHeaders(headerMap)
|
||||
|
Loading…
Reference in New Issue
Block a user