mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 04:35:16 +08:00
refactor: 调整注释(修复 Http Digest 认证时 url 上带有查询参数时认证无法通过的问题)
This commit is contained in:
parent
5543905505
commit
49622fbf2d
@ -120,7 +120,10 @@ public class SaHttpDigestTemplate {
|
||||
String[] kv = s.split("=");
|
||||
if (kv.length == 2) {
|
||||
map.put(kv[0].trim(), kv[1].trim().replace("\"", ""));
|
||||
} else if (s.contains("=")) { // 解决字符串包含多个=,如:url带参数的问题
|
||||
}
|
||||
// 兼容字符串包含多个=的情况,如:uri 带参数的问题
|
||||
// username="sa", realm="Sa-Token", nonce="IWlEwO23oCAbIAbHX1BYnX5ddKHUdsjW", uri="/test/testDigest?name=zhangsan&age=18", response="c4359210ccb23c985234ee6e02def88d", opaque="H6jPyjwfioc0oUbDE0OSmpX7wznfxxMo", qop=auth, nc=00000002, cnonce="46dd0073c981a9c7"
|
||||
else if (s.contains("=")) {
|
||||
map.put(kv[0].trim(), s.substring(kv[0].length() + 1).trim().replace("\"", ""));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user