-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent rules for rid in RTCRtpEncodingParameters #2732
Comments
I'll expand this a bit because this is RFC-level of confusing. So, RFC8851 says RFC8852 describes the ranges differently I'm not seeing spaces in that set. It seems the only issue is |
Some of the text in the description was not rendering the way I expected it to, but it is now fixed. Really, it boils down to whether '-' and '_' are allowed, and what lengths are allowed (0? 256+?). We also have the question of implementation-specific limitations on rid length (I doubt that 255 is supported in practice). |
So, if I understand correctly, it is |
Chrome does limit mid to 32 bytes (wanted 16 but... this broke someone) since M98. Not sure if this also applies to rid, tagging @alvestrand see also https://mailarchive.ietf.org/arch/msg/mmusic/_Kew1cU1-xK6mGfVebMi1-00_EM/ |
8851 says [A-Za-z0-9_-]{1,} (or [A-Za-z0-9_-]+) |
So I guess there are the following questions:
|
In practice, people use single-character RIDs, because anything bigger bloats the RTP header. |
That's another reason to have additional rules (besides RFC 8852 and 8851) about rid on setParameters/addTransceiver, I think. |
I think this needs to be resolved in the RFC that create the problem. |
I could file an erratum on RFC 8851. We may also want to clarify in RFC 8852 that a rid SDES of length 0 (ie; the empty string) is not valid? |
My view is both 8851 and 8852 should be updated to be say 1 or more alphanumeric characters. If this update was made, it might also be good to change the max size from 255 to 16. Right now from a language lawyer point of view, one might argue that they are not actually in conflict, one limits what you can do in RTP and the other limits what you can do in SDP. JSEP requires you to use the same in both so that would mean the only really useable was the intersection of the two. 8851 requires length longer than 0, and 8852 requires no _ or - characters. Both allow a length up to 255. |
IOW, webrtc-pc should require rids to conform to both RFC8851 and RFC8852? |
Why not file an errata on both? Seems unlikely that the differences between RFC 8851 and 8852 were intentional. |
Yes - I agree. I think this is just a simple case of a bug in the spec between those two RFCs |
I discussed the possibility of restricting the size to 16 instead of 255 with abr, and he pointed out that this might be something worth doing in a bis, but it would be hard to justify as an erratum. |
Do the implementations limit to 16 characters? |
Spec says that RFC 8851 is the source of truth:
'rid-id = 1*(alpha-numeric / "-" / "_")'
However, RFC 8852 has very different rules, which are actually more important than SDP BNF:
'As with all SDES items, RtpStreamId and RepairedRtpStreamId are limited to a total of 255 octets in length. RtpStreamId and RepairedRtpStreamId are constrained to contain only alphanumeric characters. For avoidance of doubt, the only allowed byte values for these IDs are decimal 48 through 57, 65 through 90, and 97 through 122'
Some examples:
rid: "" -> Invalid according to 8851, valid according to 8852
rid: "a-z" and rid: "a_z" -> Valid according to 8851, invalid according to 8852
rid: "<insert the complete works of Shakespeare here>" -> Valid according to 8851, invalid according to 8852
I briefly corresponded with abr on this, and his opinion is that 8852 is correct and 8851 is wrong.
That said, the empty string is probably not something we should permit.
The text was updated successfully, but these errors were encountered: