sdroege / rtsp-types

RTSP (RFC 7826) types and parsers/serializers
MIT License
26 stars 13 forks source link

Transport header's parsing #18

Closed r4v3n6101 closed 1 year ago

r4v3n6101 commented 1 year ago

Hello! Great work, I'm glad it exists and I can use it. Thanks! But unfortunately I've got trouble where we couldn't specify some transport headers. Well, if mode's value isn't wrapped with quotes, we'll be getting error all the time. But RFC 2326 declares absence of quotes as an alternative to quoted variant, so they're kind of optional.

Here it was declared: RFC 2326, page 60

sdroege commented 1 year ago

Indeed, for RTSP 1 this is allowed but not for RTSP 2. I don't think I ever saw it used without ".

Do you want to provide a PR for allowing this in the parser?

r4v3n6101 commented 1 year ago

Well, here it is: https://github.com/sdroege/rtsp-types/pull/19 I also made a change so PLAY and RECORD in mode are parsed in case-insensitive way (i.e. mode=play is fine)