Commit 495ef72a39784d5c2e8f1582266bba65c039159a
1 parent
94a1bfc7
fix: equalsIgnoreCase
Showing
1 changed file
with
3 additions
and
3 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/AliyunSmsClient.java
| ... | ... | @@ -153,8 +153,8 @@ public class AliyunSmsClient extends AbstractSmsClient { |
| 153 | 153 | StringBuilder canonicalHeaders = new StringBuilder(); // 构造请求头,多个规范化消息头,按照消息头名称(小写)的字符代码顺序以升序排列后拼接在一起 |
| 154 | 154 | StringBuilder signedHeadersBuilder = new StringBuilder(); // 已签名消息头列表,多个请求头名称(小写)按首字母升序排列并以英文分号(;)分隔 |
| 155 | 155 | headers.entrySet().stream().filter(entry -> entry.getKey().toLowerCase().startsWith("x-acs-") |
| 156 | - || entry.getKey().equalsIgnoreCase("host") | |
| 157 | - || entry.getKey().equalsIgnoreCase("content-type")) | |
| 156 | + || "host".equalsIgnoreCase(entry.getKey()) | |
| 157 | + || "content-type".equalsIgnoreCase(entry.getKey())) | |
| 158 | 158 | .sorted(Map.Entry.comparingByKey()).forEach(entry -> { |
| 159 | 159 | String lowerKey = entry.getKey().toLowerCase(); |
| 160 | 160 | canonicalHeaders.append(lowerKey).append(":").append(String.valueOf(entry.getValue()).trim()).append("\n"); |
| ... | ... | @@ -195,4 +195,4 @@ public class AliyunSmsClient extends AbstractSmsClient { |
| 195 | 195 | .replace("%7E", "~"); // 波浪号 "%7E" 被替换为 "~" |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | -} | |
| 199 | 198 | \ No newline at end of file |
| 199 | +} | ... | ... |