Fix RTSP auth for RtspServer project #244

This commit is contained in:
Alexey Khit
2023-02-09 06:44:13 +03:00
parent 58146b7e7e
commit 2e4b28d871

View File

@@ -70,7 +70,9 @@ func (a *Auth) Write(req *Request) {
case AuthBasic:
req.Header.Set("Authorization", a.header)
case AuthDigest:
uri := req.URL.RequestURI()
// important to use String except RequestURL for RtspServer:
// https://github.com/AlexxIT/go2rtc/issues/244
uri := req.URL.String()
h2 := HexMD5(req.Method, uri)
response := HexMD5(a.h1nonce, h2)
header := a.header + fmt.Sprintf(