This commit is contained in:
Looly
2019-12-20 16:03:23 +08:00
parent 3eedc8a761
commit 8932801137
27 changed files with 55 additions and 30 deletions

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>cn.hutool</groupId>
<artifactId>hutool-parent</artifactId>
<version>5.1.0</version>
<version>5.1.1-SNAPSHOT</version>
</parent>
<artifactId>hutool-http</artifactId>

View File

@@ -549,10 +549,13 @@ public class HttpUtil {
int pathEndPos = paramsStr.indexOf('?');
if (pathEndPos > -1) {
paramsStr = StrUtil.subSuf(paramsStr, pathEndPos + 1);
if (StrUtil.isBlank(paramsStr)) {
return Collections.emptyMap();
}
}
final Map<String, List<String>> params = new LinkedHashMap<>();
final int len = paramsStr.length();
final Map<String, List<String>> params = new LinkedHashMap<>();
String name = null;
int pos = 0; // 未处理字符开始位置
int i; // 未处理字符结束位置