mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
fix 优化 HTTP GET 请求打开重定向
This commit is contained in:
parent
f7030a1db9
commit
752d3f1894
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
||||
# 🚀 版本日志
|
||||
|
||||
## 2.9.5
|
||||
|
||||
### 🐣 新增功能
|
||||
|
||||
### 🐞 解决BUG、优化功能
|
||||
|
||||
1. 优化 HTTP GET 请求打开重定向
|
||||
|
||||
------
|
||||
|
||||
## 2.9.4 (2022-07-12)
|
||||
|
||||
### 🐣 新增功能
|
||||
|
@ -165,7 +165,7 @@ public class AutoRegSeverNode {
|
||||
urlBuilder.addQuery("port", port + "");
|
||||
//
|
||||
String build = urlBuilder.build();
|
||||
try (HttpResponse execute = HttpUtil.createGet(build).execute()) {
|
||||
try (HttpResponse execute = HttpUtil.createGet(build, true).execute()) {
|
||||
String body = execute.body();
|
||||
Console.log("push result:" + body);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class RemoteVersion extends BaseJsonModel {
|
||||
String body = StrUtil.EMPTY;
|
||||
try {
|
||||
log.debug("use remote version url: {}", remoteVersionUrl);
|
||||
HttpRequest request = HttpUtil.createGet(remoteVersionUrl);
|
||||
HttpRequest request = HttpUtil.createGet(remoteVersionUrl, true);
|
||||
try (HttpResponse execute = request.execute()) {
|
||||
body = execute.body();
|
||||
}
|
||||
@ -203,7 +203,7 @@ public class RemoteVersion extends BaseJsonModel {
|
||||
// 获取 changelog
|
||||
String changelogUrl = remoteVersion.getChangelogUrl();
|
||||
if (StrUtil.isNotEmpty(changelogUrl)) {
|
||||
try (HttpResponse execute = HttpUtil.createGet(changelogUrl).execute()) {
|
||||
try (HttpResponse execute = HttpUtil.createGet(changelogUrl, true).execute()) {
|
||||
String body = execute.body();
|
||||
remoteVersion.setChangelog(body);
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ public class NodeForward {
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public static void requestDownload(NodeModel nodeModel, HttpServletRequest request, HttpServletResponse response, NodeUrl nodeUrl) {
|
||||
String url = nodeModel.getRealUrl(nodeUrl);
|
||||
HttpRequest httpRequest = HttpUtil.createGet(url);
|
||||
HttpRequest httpRequest = HttpUtil.createGet(url, true);
|
||||
addUser(httpRequest, nodeModel, nodeUrl);
|
||||
//
|
||||
Map params = ServletUtil.getParams(request);
|
||||
|
@ -50,7 +50,7 @@ public class DefaultWebhookPluginImpl implements IDefaultPlugin {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
HttpRequest httpRequest = HttpUtil.createGet(webhook);
|
||||
HttpRequest httpRequest = HttpUtil.createGet(webhook, true);
|
||||
httpRequest.form(parameter);
|
||||
try (HttpResponse execute = httpRequest.execute()) {
|
||||
String body = execute.body();
|
||||
|
Loading…
Reference in New Issue
Block a user