rtsp-client: remove query part from content-base string

Make sure that after the control url has been resolved, it's
not a part of the query-string.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=706568
This commit is contained in:
Patricia Muscalu 2013-08-22 12:10:39 +02:00 committed by Wim Taymans
parent 1287b5f772
commit ff10d24130

View file

@ -1632,7 +1632,7 @@ handle_describe_request (GstRTSPClient * client, GstRTSPContext * ctx)
GstRTSPResult res;
GstSDPMessage *sdp;
guint i, str_len;
gchar *str, *content_base;
gchar *str, *str_query, *content_base;
GstRTSPMedia *media;
GstRTSPClientClass *klass;
@ -1676,6 +1676,13 @@ handle_describe_request (GstRTSPClient * client, GstRTSPContext * ctx)
str = gst_rtsp_url_get_request_uri (ctx->uri);
str_len = strlen (str);
/* check for query part */
if (ctx->uri->query != NULL) {
str_query = g_strrstr (str, "?");
*str_query = '\0';
str_len = strlen (str);
}
/* check for trailing '/' and append one */
if (str[str_len - 1] != '/') {
content_base = g_malloc (str_len + 2);