From 9720126f6e9042fc1a0d82bebb26cb20573d9bf2 Mon Sep 17 00:00:00 2001 From: AndyBernie Date: Sun, 16 Aug 2020 17:21:20 +0800 Subject: [PATCH] Update HttpHelper.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在HTTP请求头中Referrer写作Referer --- app/src/main/java/io/legado/app/help/http/HttpHelper.kt | 4 ++-- 1 file changed, 2 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 240152b68..9aae08bdf 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 @@ -52,7 +52,7 @@ object HttpHelper { fun getBytes(url: String, referrer: String): ByteArray? { NetworkUtils.getBaseUrl(url)?.let { baseUrl -> val headers = - mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referrer", referrer)) + mapOf(Pair(AppConst.UA_NAME, AppConst.userAgent), Pair("Referer", referrer)) return getByteRetrofit(baseUrl) .create(HttpGetApi::class.java) .getMapByte(url, mapOf(), headers) @@ -132,4 +132,4 @@ object HttpHelper { webView.load(params) } -} \ No newline at end of file +}