restore support for cameras with percent sign in password, broken after 1e612f2

This commit is contained in:
aler9
2022-05-10 17:32:11 +02:00
parent 5d66170bd7
commit 6fe7a316ba
2 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package base
import (
"net/url"
"testing"
"github.com/stretchr/testify/require"
@@ -22,11 +23,12 @@ func TestURLParse(t *testing.T) {
}{
{
"ipv6 stateless",
`rtsp://[fe80::a8f4:3219:f33e:a072%wl0]:8554/proxied`,
`rtsp://user:pa%23ss@[fe80::a8f4:3219:f33e:a072%wl0]:8554/prox%23ied`,
&URL{
Scheme: "rtsp",
Host: "[fe80::a8f4:3219:f33e:a072%wl0]:8554",
Path: "/proxied",
Path: "/prox#ied",
User: url.UserPassword("user", "pa#ss"),
},
},
} {