diff --git a/hutool-core/src/test/java/cn/hutool/core/net/UrlBuilderTest.java b/hutool-core/src/test/java/cn/hutool/core/net/UrlBuilderTest.java index ae9e1e228..2dfccdf95 100644 --- a/hutool-core/src/test/java/cn/hutool/core/net/UrlBuilderTest.java +++ b/hutool-core/src/test/java/cn/hutool/core/net/UrlBuilderTest.java @@ -488,4 +488,10 @@ public class UrlBuilderTest { final String build = httpUrl.build(CharsetUtil.CHARSET_UTF_8); assertEquals("/a:1/b:1/c:1/d:1/", build); } + + @Test + public void issueIAAOC1Test() { + final UrlBuilder urlBuilder = UrlBuilder.ofHttp("http://localhost:9999/getReportDataList?goodsName=工业硫酸98%&conReportTypeId=1"); + assertEquals("http://localhost:9999/getReportDataList?goodsName=%E5%B7%A5%E4%B8%9A%E7%A1%AB%E9%85%B898%25&conReportTypeId=1", urlBuilder.build()); + } } diff --git a/hutool-http/src/test/java/cn/hutool/http/HttpRequestTest.java b/hutool-http/src/test/java/cn/hutool/http/HttpRequestTest.java index 6a501e118..c4db9c305 100644 --- a/hutool-http/src/test/java/cn/hutool/http/HttpRequestTest.java +++ b/hutool-http/src/test/java/cn/hutool/http/HttpRequestTest.java @@ -261,6 +261,13 @@ public class HttpRequestTest { .form("passport", "12456") .execute(); Console.log(response.body()); + } + @Test + @Ignore + public void issueIAAOC1Test() { + HttpGlobalConfig.setDecodeUrl(true); + HttpRequest request = HttpRequest.get("http://localhost:9999/qms/bus/qmsBusReportCenterData/getReportDataList?reportProcessNo=A00&goodsName=工业硫酸98%&conReportTypeId=1010100000000000007&measureDateStr=2024-07-01"); + request.execute(); } }