mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
base: fix encoding/decoding of RTP-Info header
This commit is contained in:
@@ -17,7 +17,7 @@ const (
|
|||||||
func headerKeyNormalize(in string) string {
|
func headerKeyNormalize(in string) string {
|
||||||
switch strings.ToLower(in) {
|
switch strings.ToLower(in) {
|
||||||
case "rtp-info":
|
case "rtp-info":
|
||||||
return "RTP-INFO"
|
return "RTP-Info"
|
||||||
|
|
||||||
case "www-authenticate":
|
case "www-authenticate":
|
||||||
return "WWW-Authenticate"
|
return "WWW-Authenticate"
|
||||||
|
@@ -64,8 +64,8 @@ var casesHeader = []struct {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"normalized keys, standard",
|
"normalized keys, standard",
|
||||||
[]byte("Content-type: testing\r\n" +
|
[]byte("content-type: testing\r\n" +
|
||||||
"Content-length: value\r\n" +
|
"content-length: value\r\n" +
|
||||||
"\r\n"),
|
"\r\n"),
|
||||||
[]byte("Content-Length: value\r\n" +
|
[]byte("Content-Length: value\r\n" +
|
||||||
"Content-Type: testing\r\n" +
|
"Content-Type: testing\r\n" +
|
||||||
@@ -77,14 +77,17 @@ var casesHeader = []struct {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"normalized keys, non-standard",
|
"normalized keys, non-standard",
|
||||||
[]byte("Www-Authenticate: value\r\n" +
|
[]byte("www-authenticate: value\r\n" +
|
||||||
"Cseq: value\r\n" +
|
"cseq: value\r\n" +
|
||||||
|
"rtp-info: value\r\n" +
|
||||||
"\r\n"),
|
"\r\n"),
|
||||||
[]byte("CSeq: value\r\n" +
|
[]byte("CSeq: value\r\n" +
|
||||||
|
"RTP-Info: value\r\n" +
|
||||||
"WWW-Authenticate: value\r\n" +
|
"WWW-Authenticate: value\r\n" +
|
||||||
"\r\n"),
|
"\r\n"),
|
||||||
Header{
|
Header{
|
||||||
"CSeq": HeaderValue{"value"},
|
"CSeq": HeaderValue{"value"},
|
||||||
|
"RTP-Info": HeaderValue{"value"},
|
||||||
"WWW-Authenticate": HeaderValue{"value"},
|
"WWW-Authenticate": HeaderValue{"value"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user