From e37292dec0677f70d5f568322fbd2c57eb0aa9cc Mon Sep 17 00:00:00 2001 From: Looly Date: Tue, 17 Jan 2023 11:13:46 +0800 Subject: [PATCH] =?UTF-8?q?HttpUtil.decodeParams=E5=A2=9E=E5=8A=A0isFormUr?= =?UTF-8?q?lEncoded=E9=87=8D=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- hutool-http/src/main/java/cn/hutool/http/HttpUtil.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12df5ed84..2894969a7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ------------------------------------------------------------------------------------------------------------- -# 5.8.12.M1 (2023-01-16) +# 5.8.12.M1 (2023-01-17) ### 🐣新特性 * 【core 】 XmlUtil.readObjectFromXml增加注入漏洞的警告注释,并标识为废弃(issue#2857@Github) @@ -11,6 +11,7 @@ * 【core 】 重构根据file magic number判断文件类型(pr#2834@Github) * 【core 】 增加WGS84 坐标与墨卡托投影互转(pr#2811@Github) * 【extra 】 ServletUtil遵循rfc 3986优化(issue#I6ALAO@Gitee) +* 【http 】 HttpUtil.decodeParams增加isFormUrlEncoded重载(pr#918@Gitee) ### 🐞Bug修复 * 【core 】 修复HexUtil.isHexNumber()对"-"的判断问题(issue#2857@Github) diff --git a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java b/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java index 38b7f80d5..ce0894ca2 100755 --- a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java +++ b/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java @@ -623,7 +623,9 @@ public class HttpUtil { * * @param paramsStr 参数字符串(或者带参数的Path) * @param charset 字符集 + * @param isFormUrlEncoded 是否为x-www-form-urlencoded模式,此模式下空格会编码为'+' * @return 参数Map + * @since 5.8.12 */ public static Map> decodeParams(String paramsStr, String charset, boolean isFormUrlEncoded) { return decodeParams(paramsStr, CharsetUtil.charset(charset), isFormUrlEncoded);