From 2bc386fe864b362b474c9260a3733764e3c4e94b Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 7 May 2022 21:05:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/help/glide/OkHttpStreamFetcher.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 f0cde2f3f..7584fced8 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,9 +39,7 @@ class OkHttpStreamFetcher(private val url: GlideUrl, private val options: Option } val requestBuilder: Request.Builder = Request.Builder().url(url.toStringUrl()) val headerMap = HashMap() - for ((key, value) in url.headers.entries) { - headerMap[key] = value - } + headerMap.putAll(url.headers) options.get(OkHttpModelLoader.sourceOriginOption)?.let { sourceUrl -> val source = appDb.bookSourceDao.getBookSource(sourceUrl) ?: appDb.rssSourceDao.getByKey(sourceUrl)