Skip to content

Commit

Permalink
[feat]补充rtsp Basic论证测试例子
Browse files Browse the repository at this point in the history
  • Loading branch information
joestarzxh committed Mar 16, 2022
1 parent ca8923a commit b775a63
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/rtsp/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@ func TestGetRtspFirstAuth(t *testing.T) {
assert.Equal(t, "admin", rtspAuth.Username)
assert.Equal(t, "admin123", rtspAuth.Password)
}
/*
OPTIONS rtsp://35.13.202.5:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
CSeq: 1
User-Agent: lal/0.20.3
RTSP/1.0 401 Unauthorized
CSeq: 1
WWW-Authenticate: Basic realm="MediaServer3.0"
OPTIONS rtsp://35.13.202.5:554/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
CSeq: 2
User-Agent: lal/0.20.3
Authorization: Basic YWRtaW46YWRtaW4=
RTSP/1.0 200 OK
CSeq: 2
Server: Rtsp Server/3.0
Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER, ANNOUNCE
*/

func TestRtspBasicAuth(t *testing.T) {
var rtspAuth rtsp.Auth
Expand Down

0 comments on commit b775a63

Please sign in to comment.