fix: 修复同步远程excel数据出错

This commit is contained in:
taojinlong
2025-03-06 16:15:08 +08:00
committed by taojinlong
parent 9a17e1382b
commit fed2f32afb
3 changed files with 29 additions and 92 deletions

View File

@@ -373,7 +373,6 @@ public class HttpClientUtil {
HttpGet httpGet = new HttpGet(url);
// 设置请求配置
httpGet.setConfig(config.buildRequestConfig());
// 设置请求头
config.getHeader().forEach(httpGet::addHeader);
HttpResponse response = httpClient.execute(httpGet);
@@ -408,6 +407,7 @@ public class HttpClientUtil {
}
}
if (fileName.isEmpty()) {
url = url.split("\\?")[0];
fileName = url.contains("/")
? url.substring(url.lastIndexOf('/') + 1)
: "download_" + System.currentTimeMillis();