mirror of https://github.com/EasyDarwin/EasyDarwin
fix some hk camera auth error
commit
99fa3f7093
|
@ -100,10 +100,10 @@ func DigestAuth(authLine string, method string, URL string) (string, error) {
|
||||||
}
|
}
|
||||||
realm := ""
|
realm := ""
|
||||||
nonce := ""
|
nonce := ""
|
||||||
realmRex := regexp.MustCompile(`realm="(\S+)"`)
|
realmRex := regexp.MustCompile(`realm="(.*?)"`)
|
||||||
result1 := realmRex.FindStringSubmatch(authLine)
|
result1 := realmRex.FindStringSubmatch(authLine)
|
||||||
|
|
||||||
nonceRex := regexp.MustCompile(`nonce="(\S+)"`)
|
nonceRex := regexp.MustCompile(`nonce="(.*?)"`)
|
||||||
result2 := nonceRex.FindStringSubmatch(authLine)
|
result2 := nonceRex.FindStringSubmatch(authLine)
|
||||||
|
|
||||||
if len(result1) == 2 {
|
if len(result1) == 2 {
|
||||||
|
|
Loading…
Reference in New Issue