GNOME Bugzilla – Bug 701266
gst_rtsp_url_parse cannot handle valid path "*"
Last modified: 2014-02-25 22:28:09 UTC
According to RFC 2326 section 6, * is a valid path for some request. We have used this with the OPTIONS method to signal keep-alive: OPTIONS * RTSP/1.0 As it is now, gst_rtsp_url_parse returns false for these urls. Working on a patch...
Created attachment 245644 [details] [review] Patch
Where is this rejected? I'm a bit reluctant to allow * as a url, it's not really a url at all, I think we should do something where this can be in the request.
Take a look at the section of the RFC I mentioned, it's clearly specified that it is allowed and what it means (operations concerning whole server rather than single resources). It was rejected early in the function: col = strstr (p, "://"); if (col == NULL) goto invalid; Clients do use this functionality for keep alive... N.B. this is NOT a wildcard thing and should never be treated as a wildcard....
But where is the uri from the request message parsed with gst_rtsp_url_parse()?
It's called from rtsp-client.c:1648 I agree that it's not a url as in uniform and thus maybe it's not fit for the function I modified. But it is definitely part of rtsp and it can be argued that it's part of the url scheme specific to rtsp. So we are splitting hairs here :) If we should not have it part of this function, we need to either make another one that returns an almost empty url object or make a special case in the rtsp-server. In both cases I think it still needs to amount to a GstRTSPUrl object... After all, "*" is a string that does indicate a resource in the rtsp call: the server itself. I am of course open to suggestions. I mean the fix itself is so small, so anyway you want it is fine from my perspective.
Created attachment 246406 [details] [review] Patch This patch takes another approach - it checks if path is "*" and sets state->uri to NULL.
Created attachment 246407 [details] [review] Patch same as last one - just forgot to remove a goto label that wasn't used
yes, I like that better
(In reply to comment #8) > yes, I like that better Do you have any more comments on the patch?
commit a5490e323be28739369ca477a71fc224797f96d8 Author: Alexander Schrab <alexas@axis.com> Date: Thu Jun 20 11:17:29 2013 +0200 client: handle asterisk as path in requests Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701266