1
0
mirror of https://gitee.com/dromara/hutool.git synced 2025-04-05 17:37:59 +08:00

修复getFileNameFromDisposition获取头错误问题

This commit is contained in:
Looly 2024-06-27 11:58:40 +08:00
parent 2196433fbb
commit b8db9b1a8d
2 changed files with 3 additions and 2 deletions
CHANGELOG.md
hutool-http/src/main/java/cn/hutool/http

View File

@ -2,7 +2,7 @@
# 🚀Changelog
-------------------------------------------------------------------------------------------------------------
# 5.8.29(2024-06-21)
# 5.8.29(2024-06-27)
### 🐣新特性
* 【core 】 DateUtil增加offsetYear方法
@ -24,6 +24,7 @@
* 【db 】 修复PooledConnection可能的数据库驱动未找到问题issue#IA6EUQ@Gitee
* 【http 】 修复Mac下的微信浏览器被识别为移动端问题issue#IA74K2@Gitee
* 【core 】 修复Tailer指定初始读取行数的计算错误问题issue#IA77ML@Gitee
* 【http 】 修复getFileNameFromDisposition获取头错误问题issue#3632@Github
-------------------------------------------------------------------------------------------------------------
# 5.8.28(2024-05-29)

View File

@ -489,7 +489,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
*/
public String getFileNameFromDisposition(String paramName) {
paramName = ObjUtil.defaultIfNull(paramName, "filename");
final List<String> dispositions = headerList(Header.CONTENT_DISPOSITION.name());
final List<String> dispositions = headerList(Header.CONTENT_DISPOSITION.getValue());
String fileName = null;
if (CollUtil.isNotEmpty(dispositions)) {