我的回复标题有问题:
org.apache.http.ProtocolException: Invalid header: :: std_case: HASH(0x7ff022faf630)
这是在调用booking.com网址时。例如。 http://www.booking.com/hotel/gb/the-rothley-court.html?aid=374908
同样,问题出现在org.apache.http.message.BufferedHeader中缓冲区
:: std_case:HASH(0x7ff022faf630)
这会从导致所有问题的冒号开始!
我使用的是httpcore-4.4.6(最新的Maven) BufferedHeader中的违规代码是:
public BufferedHeader(CharArrayBuffer buffer) throws ParseException {
Args.notNull(buffer, "Char array buffer");
int colon = buffer.indexOf(58);
if(colon == -1) {
throw new ParseException("Invalid header: " + buffer.toString());
} else {
String s = buffer.substringTrimmed(0, colon);
if(s.length() == 0) {
throw new ParseException("Invalid header: " + buffer.toString());
} else {
this.buffer = buffer;
this.name = s;
this.valuePos = colon + 1;
}
}
}
有没有人为此找到了解决办法呢?