Compare commits

...

4 Commits
v5.2.1 ... main

Author SHA1 Message Date
Kelvin Lawson
d0b37aa0dd Support URI format sent by HappyTime ONVIF and RTSP clients during (#964)
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
2025-12-22 17:45:14 +01:00
dependabot[bot]
94e7927447 Bump golang.org/x/net from 0.47.0 to 0.48.0 (#963)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.47.0 to 0.48.0.
- [Commits](https://github.com/golang/net/compare/v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-12 01:45:44 +01:00
dependabot[bot]
2747e1266c Bump github.com/bluenviron/mediacommon/v2 from 2.5.2 to 2.5.3 (#962)
Bumps [github.com/bluenviron/mediacommon/v2](https://github.com/bluenviron/mediacommon) from 2.5.2 to 2.5.3.
- [Commits](https://github.com/bluenviron/mediacommon/compare/v2.5.2...v2.5.3)

---
updated-dependencies:
- dependency-name: github.com/bluenviron/mediacommon/v2
  dependency-version: 2.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-12 01:45:25 +01:00
bluenviron-bot
0185fc96ce bump golangci-lint to 2.7.2 (#961) 2025-12-12 01:45:22 +01:00
5 changed files with 21 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.25-alpine3.22
LINT_IMAGE = golangci/golangci-lint:v2.7.1
LINT_IMAGE = golangci/golangci-lint:v2.7.2
.PHONY: $(shell ls)

6
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/bluenviron/gortsplib/v5
go 1.24.0
require (
github.com/bluenviron/mediacommon/v2 v2.5.2
github.com/bluenviron/mediacommon/v2 v2.5.3
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/pion/rtcp v1.2.16
@@ -11,7 +11,7 @@ require (
github.com/pion/sdp/v3 v3.0.16
github.com/pion/srtp/v3 v3.0.9
github.com/stretchr/testify v1.11.1
golang.org/x/net v0.47.0
golang.org/x/net v0.48.0
)
require (
@@ -22,6 +22,6 @@ require (
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/transport/v3 v3.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/sys v0.39.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

12
go.sum
View File

@@ -2,8 +2,8 @@ github.com/asticode/go-astikit v0.30.0 h1:DkBkRQRIxYcknlaU7W7ksNfn4gMFsB0tqMJflx
github.com/asticode/go-astikit v0.30.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
github.com/asticode/go-astits v1.14.0 h1:zkgnZzipx2XX5mWycqsSBeEyDH58+i4HtyF4j2ROb00=
github.com/asticode/go-astits v1.14.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI=
github.com/bluenviron/mediacommon/v2 v2.5.2 h1:eq7LHJFksDAVtVdTrwOUl7dO7LE8eKwLgYKYi5MmYaY=
github.com/bluenviron/mediacommon/v2 v2.5.2/go.mod h1:5V15TiOfeaNVmZPVuOqAwqQSWyvMV86/dijDKu5q9Zs=
github.com/bluenviron/mediacommon/v2 v2.5.3 h1:espW+MsV1IYH6WE3QGa1UgPnIp13JuJG4VqGvoqseBU=
github.com/bluenviron/mediacommon/v2 v2.5.3/go.mod h1:5V15TiOfeaNVmZPVuOqAwqQSWyvMV86/dijDKu5q9Zs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -32,10 +32,10 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

View File

@@ -31,11 +31,11 @@ func urlMatches(expected string, received string, isSetup bool) bool {
return true
}
// in SETUP requests, VLC uses the base URL of the stream
// instead of the URL of the track.
// Strip the control attribute to obtain the URL of the stream.
// in SETUP requests, some clients do not use the track URL:
// - VLC uses the stream base URL (with trailing slash)
// - HappyTime NVR uses the stream URL (without trailing slash)
if isSetup {
if m := reControlAttribute.FindStringSubmatch(expected); m != nil && received == m[1] {
if m := reControlAttribute.FindStringSubmatch(expected); m != nil && (received == m[1] || (received+"/") == m[1]) {
return true
}
}

View File

@@ -48,6 +48,13 @@ var casesVerify = []struct {
"uri=\"rtsp://myhost/mypath?key=val/\", response=\"5ca5ceeca20a05e9a3f49ecde4b42655\"",
},
},
{
"digest happytime",
base.HeaderValue{
`Digest username="myuser", realm="myrealm", nonce="f49ac6dd0ba708d4becddc9692d1f2ce", ` +
`uri="rtsp://myhost/mypath?key=val", response="c11a6e92b449f221dabf494a7a837ee3"`,
},
},
}
func TestVerify(t *testing.T) {