From 2e4b28d87169095c71336655e9d7c01d8fa9cc25 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Thu, 9 Feb 2023 06:44:13 +0300 Subject: [PATCH] Fix RTSP auth for RtspServer project #244 --- pkg/tcp/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/tcp/auth.go b/pkg/tcp/auth.go index 0aa2c45b..ec47998a 100644 --- a/pkg/tcp/auth.go +++ b/pkg/tcp/auth.go @@ -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(