Closed Paul-E closed 7 years ago
I think this is a classic case of: be liberal on what you receive, be strict on what you send.
So when we generate SDP should only use SP. But we make the live of everyone a lot easier when we are flexible on the amount and kind of withe spaces. Especially as it doesn't cost us any thing to do so, because we get the split method from Rust for free. I'm pretty sure the spec is only strict about it to make it easier for implementers.
rsdparsa splits on any arbitrary amount of any kind of whitespace, whereas the RFCs usually specify tokens are separted by
SP
, which is defined by theRBNF RFC
(https://tools.ietf.org/html/rfc5234#appendix-B.1) as only0x20
. Do we want to be more strict in parsing SDP? I would guess being strict would break a lot of things if SIPCC already splits on any kind of whitespace pattern.