Skip to content

Commit

Permalink
Support for additional values for bandwidth type
Browse files Browse the repository at this point in the history
Support additional bandwidth types defined in RFC3890 and RFC3556
  • Loading branch information
babolivier committed Feb 18, 2021
1 parent 4f18d96 commit 2751df9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,11 @@ func unmarshalBandwidth(value string) (*Bandwidth, error) {
experimental := strings.HasPrefix(parts[0], "X-")
if experimental {
parts[0] = strings.TrimPrefix(parts[0], "X-")
} else if !anyOf(parts[0], "CT", "AS") {
} else if !anyOf(parts[0], "CT", "AS", "TIAS", "RS", "RR") {
// Set according to currently registered with IANA
// https://tools.ietf.org/html/rfc4566#section-5.8
// https://tools.ietf.org/html/rfc3890#section-6.2
// https://tools.ietf.org/html/rfc3556#section-2
return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, parts[0])
}

Expand Down

0 comments on commit 2751df9

Please sign in to comment.