This commit is contained in:
Gabriele Degola 2025-01-21 16:05:11 +09:00 committed by GitHub
commit 8de61b033c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -558,6 +558,12 @@ func (client *RTSPClient) request(method string, customHeaders map[string]string
if splits[0] == "Content-length" { if splits[0] == "Content-length" {
splits[0] = "Content-Length" splits[0] = "Content-Length"
} }
if val, ok := res[splits[0]]; ok {
if splits[0] == "WWW-Authenticate" && strings.Contains(val, "Digest") && strings.Contains(splits[1], "Basic") {
// prioritise digest authentication
continue
}
}
res[splits[0]] = splits[1] res[splits[0]] = splits[1]
} }
} }