sdroege / rtsp-types

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

Content-Length with the string sensitive case issue #7

Closed qianzhang5 closed 3 years ago

qianzhang5 commented 3 years ago

Hi @sdroege , The body() in parser.rs may miss some cases that "Content-Length:" has up or lowercase. It would be better that find(|h| h.name == "Content-Length") is implemented in case insensitive comparing.
BTW, It would be nicer that Message includes "Annnounce" type that is a standard method in RTPS/1.0. Thanks!

qianzhang5 commented 3 years ago

Besides Announce, another type "Record" is missing. following are all request types in RFC2326. Request-Line = Method SP Request-URI SP RTSP-Version CRLF

Method = "DESCRIBE" ; Section 10.2 | "ANNOUNCE" ; Section 10.3 | "GET_PARAMETER" ; Section 10.8 | "OPTIONS" ; Section 10.1 | "PAUSE" ; Section 10.6 | "PLAY" ; Section 10.5 | "RECORD" ; Section 10.11 | "REDIRECT" ; Section 10.10 | "SETUP" ; Section 10.4 | "SET_PARAMETER" ; Section 10.9 | "TEARDOWN" ; Section 10.7 | extension-method

sdroege commented 3 years ago

Hi @sdroege , The body() in parser.rs may miss some cases that "Content-Length:" has up or lowercase. It would be better that find(|h| h.name == "Content-Length") is implemented in case insensitive comparing.

Yes, header names are indeed case insensitive. Do you want to submit a PR for this?

BTW, It would be nicer that Message includes "Annnounce" type that is a standard method in RTPS/1.0. Thanks!

And also Record :) Feel free to send a PR to add it to the method type.

qianzhang5 commented 3 years ago

I created a PR from a fork https://github.com/qianzhang5/rtsp-types at branch qian

On Sun, May 2, 2021 at 2:23 AM Sebastian Dröge @.***> wrote:

Hi @sdroege https://github.com/sdroege , The body() in parser.rs may miss some cases that "Content-Length:" has up or lowercase. It would be better that find(|h| h.name == "Content-Length") is implemented in case insensitive comparing.

Yes, header names are indeed case insensitive. Do you want to submit a PR for this?

BTW, It would be nicer that Message includes "Annnounce" type that is a standard method in RTPS/1.0. Thanks!

And also Record :) Feel free to send a PR to add it to the method type.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sdroege/rtsp-types/issues/7#issuecomment-830778115, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCC3AAJKFMNDNIPDGKPSCDTLUK2LANCNFSM436UICEA .