mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 12:18:01 +08:00
add comment
This commit is contained in:
parent
e2de04d36f
commit
63fc4d175b
@ -11,6 +11,7 @@
|
||||
* 【crypto 】 MacEngine增加接口update,doFinal,reset等接口
|
||||
* 【core 】 StrSpliter更名为StrSplitter
|
||||
* 【core 】 NumberUtil的decimalFormat增加数字检查
|
||||
* 【http 】 HttpBase的httpVersion方法设置为无效(issue#1644)
|
||||
|
||||
### 🐞Bug修复
|
||||
|
||||
|
@ -244,8 +244,9 @@ public abstract class HttpBase<T> {
|
||||
public String httpVersion() {
|
||||
return httpVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置http版本
|
||||
* 设置http版本,此方法不会影响到实际请求的HTTP版本,只用于帮助判断是否connect:Keep-Alive
|
||||
*
|
||||
* @param httpVersion Http版本,{@link HttpBase#HTTP_1_0},{@link HttpBase#HTTP_1_1}
|
||||
* @return this
|
||||
|
@ -42,9 +42,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
|
||||
private static final String CONTENT_TYPE_MULTIPART_PREFIX = ContentType.MULTIPART.getValue() + "; boundary=";
|
||||
private static final String CONTENT_TYPE_FILE_TEMPLATE = "Content-Type: {}\r\n\r\n";
|
||||
|
||||
/**
|
||||
* 设置全局默认的连接和读取超时时长
|
||||
*
|
||||
@ -387,7 +384,7 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
public boolean isKeepAlive() {
|
||||
String connection = header(Header.CONNECTION);
|
||||
if (connection == null) {
|
||||
return !HTTP_1_0.equalsIgnoreCase(httpVersion);
|
||||
return false == HTTP_1_0.equalsIgnoreCase(httpVersion);
|
||||
}
|
||||
|
||||
return false == "close".equalsIgnoreCase(connection);
|
||||
|
Loading…
Reference in New Issue
Block a user