From bfe25ab3d1e9ff6cd779d52e6eb78986ae58f29a Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 19 Dec 2021 11:59:31 +0800 Subject: [PATCH] =?UTF-8?q?post=E5=8F=AF=E4=BB=A5=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AF=86=E5=88=ABcontentType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 1 + app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 0fd95edc6..d589d277a 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -17,6 +17,7 @@ * js添加java.logType(*),打印变量类型,方便调试时查看 * 修复从发现中打开书籍是会打开其它书源书籍的bug * 全文搜索增加跳转上一个下一个的功能 by Jason Yao +* post可以正确识别contentType **2021/12/10** diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 5d4890829..427e71292 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -209,7 +209,7 @@ class AnalyzeUrl( } } RequestMethod.POST -> body?.let { - if (!it.isJson() && !it.isXml()) { + if (!it.isJson() && !it.isXml() && headerMap["Content-Type"].isNullOrEmpty()) { analyzeFields(it) } }