Browse Source

fix some hk camera auth error

pull/132/head
macbookpro 6 years ago
parent
commit
99fa3f7093
  1. 4
      rtsp/rtsp-client.go

4
rtsp/rtsp-client.go

@ -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…
Cancel
Save