GNOME Bugzilla – Bug 758428
rtsp-server: Transport header can have spaces between comas
Last modified: 2018-07-12 18:05:25 UTC
I just got a 461 error sent by GStreamer RTSP Server to a client. That means no suitable transport. My server instance is UDP only, and the Transport header is: RTP/AVP/TCP;unicast;interleaved=0-1, RTP/AVP;unicast;client_port=54060-54061 The BNF indicate that this is a comma separated list, with an old nation, 1\#, which would be 1# today, and means 1 or more. The # in BNF is taken from HTTP. What's wrong with the server, is that you can add LWS (space, tab or CRLF) between commas. We don't strip the splitted result in the server. We should review the one we parse in the following list: transport-spec cache-directive ranges-specifier option-tag stream-url transport-spec mode References: RTSP see Transport BNF https://tools.ietf.org/html/rfc2326#page-60 HTTP see #rule https://tools.ietf.org/html/rfc2068#page-13
why is this in the rtsp-server ? Isn't it an issue in -base/gst-libs/gst/rtsp/ ?
Created attachment 372969 [details] [review] client: Strip transport parts as whitespaces could be around commas
(In reply to Edward Hervey from comment #1) > why is this in the rtsp-server ? Isn't it an issue in > -base/gst-libs/gst/rtsp/ ? Because I had no idea when I filed the bug. This is the lost patch that I managed to find back. The value is returned by gst_rtsp_message_get_header() which is in -base indeed.
Ok, I've looked inside the helpers, and there is nothing that parses the headers. It's all done in rtsp-client.c, and it's parser job to strip each transport after splitting them up.
Attachment 372969 [details] pushed as 604240f - client: Strip transport parts as whitespaces could be around commas
Picked into 1.14 as well.