From deb28db0439d2169e775ee5288220e9b1ae8beb3 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sun, 8 May 2022 06:47:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A0=E6=B3=95=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E8=AE=BE=E7=BD=AEUrlOption=E6=9B=B4=E6=94=B9glide=E7=9A=84ua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt b/app/src/main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt index 7584fced8..def845e17 100644 --- a/app/src/main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt +++ b/app/src/main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt @@ -39,7 +39,6 @@ class OkHttpStreamFetcher(private val url: GlideUrl, private val options: Option } val requestBuilder: Request.Builder = Request.Builder().url(url.toStringUrl()) val headerMap = HashMap() - headerMap.putAll(url.headers) options.get(OkHttpModelLoader.sourceOriginOption)?.let { sourceUrl -> val source = appDb.bookSourceDao.getBookSource(sourceUrl) ?: appDb.rssSourceDao.getByKey(sourceUrl) @@ -47,6 +46,7 @@ class OkHttpStreamFetcher(private val url: GlideUrl, private val options: Option headerMap.putAll(it) } } + headerMap.putAll(url.headers) requestBuilder.addHeaders(headerMap) val request: Request = requestBuilder.build() this.callback = callback