Skip to content

Commit 9f57fd7

Browse files
author
Steven Vancoillie
committed
chore: add test for lower-case header (e.g. cseq)
1 parent bbd3f9c commit 9f57fd7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/utils/protocols/fixtures.ts

+8
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,11 @@ Date: Tue, 23 Jun 2015 08:38:03 GMT
108108
`
109109
.split('\n')
110110
.join('\r\n')
111+
112+
// Example response from issue #310, with lower-case "cseq"
113+
export const optionsResponseLowerCase = `RTSP/1.0 200 OK
114+
Server: H264DVR 1.0
115+
cseq: 1
116+
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, GET_PARAMETER, PLAY, PAUSE
117+
118+
`

lib/utils/protocols/rtsp.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
sdpResponse,
1313
sdpResponseLive555,
1414
setupResponse,
15+
optionsResponseLowerCase,
1516
teardownResponse,
1617
setupResponseNoTimeout,
1718
} from './fixtures'
@@ -21,6 +22,7 @@ describe('Rtsp', () => {
2122
it('should return an int', () => {
2223
expect(sequence(Buffer.from(sdpResponse))).toEqual(3)
2324
expect(sequence(Buffer.from(setupResponse))).toEqual(5)
25+
expect(sequence(Buffer.from(optionsResponseLowerCase))).toEqual(1)
2426
})
2527
})
2628
describe('sessionId', () => {

0 commit comments

Comments
 (0)