From 7a5f910aa7b293a6e9475ce7dc28992b0aba0a57 Mon Sep 17 00:00:00 2001 From: Looly Date: Sat, 20 Apr 2024 15:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHttpRequest.header=E7=9B=B8?= =?UTF-8?q?=E5=90=8Ckey=E8=A2=AB=E8=A6=86=E7=9B=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- hutool-http/src/main/java/cn/hutool/http/HttpRequest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f248db74..692e88ddf 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ # 🚀Changelog ------------------------------------------------------------------------------------------------------------- -# 5.8.28(2024-04-18) +# 5.8.28(2024-04-20) ### 🐣新特性 * 【core 】 修正XmlUtil的omitXmlDeclaration描述注释(issue#I9CPC7@Gitee) @@ -19,6 +19,7 @@ * 【db 】 解决oracle情况下setObject(inputStream)报错问题,java.sql.SQLException: 无效的列类型问题(pr#1207@Gitee) * 【core 】 解决CalendarUtil.isSameDay时区不同导致结果错误问题(pr#3548@Github) * 【core 】 修复RandomUtil.randomStringWithoutStr方法问题(pr#1209@Gitee) +* 【http 】 修复HttpRequest.header相同key被覆盖问题(issue#I9I61C@Gitee) ------------------------------------------------------------------------------------------------------------- # 5.8.27(2024-03-29) diff --git a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java b/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java index 657acd8e8..10aa74c9e 100755 --- a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java +++ b/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java @@ -1227,7 +1227,7 @@ public class HttpRequest extends HttpBase { // 流方式上传数据 .setChunkedStreamingMode(config.blockSize) // 覆盖默认Header - .header(this.headers, true); + .header(this.headers, false); if (null != this.cookie) { // 当用户自定义Cookie时,全局Cookie自动失效