Update
This commit is contained in:
@@ -157,7 +157,7 @@ public class HttpUtil {
|
||||
|
||||
// 处理请求头
|
||||
if (!httpBody && line.split(":").length >= 2) {
|
||||
key = line.substring(0, line.indexOf(":") - 1).trim();
|
||||
key = line.substring(0, line.indexOf(":")).trim();
|
||||
value = line.substring(line.indexOf(":") + 1).trim();
|
||||
headers.put(key, value);
|
||||
continue;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Parser {
|
||||
String key;
|
||||
String value;
|
||||
for (String head : header) {
|
||||
key = head.substring(0, head.indexOf(":") - 1).trim();
|
||||
key = head.substring(0, head.indexOf(":")).trim();
|
||||
value = head.substring(head.indexOf(":") - 1).trim();
|
||||
map.put(key, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user