From 5810596e41803dda10fb8a41d0bda5caee356e3c Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 11 Aug 2020 10:38:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0referrer=E6=8B=BC=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/http/HttpHelper.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index e88702b32..240152b68 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -49,9 +49,10 @@ object HttpHelper { return null } - fun getBytes(url: String, refer: String): ByteArray? { + fun getBytes(url: String, referrer: String): ByteArray? { NetworkUtils.getBaseUrl(url)?.let { baseUrl -> - val headers = mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("refer", refer)) + val headers = + mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referrer", referrer)) return getByteRetrofit(baseUrl) .create(HttpGetApi::class.java) .getMapByte(url, mapOf(), headers)