After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758428 - rtsp-server: Transport header can have spaces between comas
rtsp-server: Transport header can have spaces between comas
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.14.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-20 22:57 UTC by Nicolas Dufresne (ndufresne)
Modified: 2018-07-12 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
client: Strip transport parts as whitespaces could be around commas (929 bytes, patch)
2018-07-06 20:13 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Nicolas Dufresne (ndufresne) 2015-11-20 22:57:07 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
Comment 1 Edward Hervey 2018-05-12 07:42:35 UTC
why is this in the rtsp-server ? Isn't it an issue in -base/gst-libs/gst/rtsp/ ?
Comment 2 Nicolas Dufresne (ndufresne) 2018-07-06 20:13:37 UTC
Created attachment 372969 [details] [review]
client: Strip transport parts as whitespaces could be around commas
Comment 3 Nicolas Dufresne (ndufresne) 2018-07-06 20:17:44 UTC
(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.
Comment 4 Nicolas Dufresne (ndufresne) 2018-07-06 20:54:58 UTC
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.
Comment 5 Nicolas Dufresne (ndufresne) 2018-07-06 20:55:35 UTC
Attachment 372969 [details] pushed as 604240f - client: Strip transport parts as whitespaces could be around commas
Comment 6 Tim-Philipp Müller 2018-07-12 18:05:25 UTC
Picked into 1.14 as well.