mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add comment
This commit is contained in:
parent
e2de04d36f
commit
63fc4d175b
@ -11,6 +11,7 @@
|
|||||||
* 【crypto 】 MacEngine增加接口update,doFinal,reset等接口
|
* 【crypto 】 MacEngine增加接口update,doFinal,reset等接口
|
||||||
* 【core 】 StrSpliter更名为StrSplitter
|
* 【core 】 StrSpliter更名为StrSplitter
|
||||||
* 【core 】 NumberUtil的decimalFormat增加数字检查
|
* 【core 】 NumberUtil的decimalFormat增加数字检查
|
||||||
|
* 【http 】 HttpBase的httpVersion方法设置为无效(issue#1644)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
|
|
||||||
|
@ -244,8 +244,9 @@ public abstract class HttpBase<T> {
|
|||||||
public String httpVersion() {
|
public String httpVersion() {
|
||||||
return httpVersion;
|
return httpVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置http版本
|
* 设置http版本,此方法不会影响到实际请求的HTTP版本,只用于帮助判断是否connect:Keep-Alive
|
||||||
*
|
*
|
||||||
* @param httpVersion Http版本,{@link HttpBase#HTTP_1_0},{@link HttpBase#HTTP_1_1}
|
* @param httpVersion Http版本,{@link HttpBase#HTTP_1_0},{@link HttpBase#HTTP_1_1}
|
||||||
* @return this
|
* @return this
|
||||||
|
@ -42,9 +42,6 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class HttpRequest extends HttpBase<HttpRequest> {
|
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() {
|
public boolean isKeepAlive() {
|
||||||
String connection = header(Header.CONNECTION);
|
String connection = header(Header.CONNECTION);
|
||||||
if (connection == null) {
|
if (connection == null) {
|
||||||
return !HTTP_1_0.equalsIgnoreCase(httpVersion);
|
return false == HTTP_1_0.equalsIgnoreCase(httpVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false == "close".equalsIgnoreCase(connection);
|
return false == "close".equalsIgnoreCase(connection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user