File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/rtp_transceiver/fmtp/generic Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -147,3 +147,14 @@ fn test_generic_fmtp_compare() {
147
147
check ( a, b) ;
148
148
}
149
149
}
150
+
151
+ #[ test]
152
+ fn test_generic_fmtp_compare_mime_type_case_mismatch ( ) {
153
+ let a = parse ( "video/vp8" , "" ) ;
154
+ let b = parse ( "video/VP8" , "" ) ;
155
+
156
+ assert ! (
157
+ b. match_fmtp( & * a) ,
158
+ "fmtp lines should match even if they use different casing"
159
+ ) ;
160
+ }
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ impl Fmtp for GenericFmtp {
38
38
/// The generic implementation is used for MimeTypes that are not defined
39
39
fn match_fmtp ( & self , f : & ( dyn Fmtp ) ) -> bool {
40
40
if let Some ( c) = f. as_any ( ) . downcast_ref :: < GenericFmtp > ( ) {
41
- if self . mime_type != c. mime_type ( ) {
41
+ if self . mime_type . to_lowercase ( ) != c. mime_type ( ) . to_lowercase ( ) {
42
42
return false ;
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments