From ff10d24130d7a759f38a660fb87dfa3ae772a888 Mon Sep 17 00:00:00 2001 From: Patricia Muscalu Date: Thu, 22 Aug 2013 12:10:39 +0200 Subject: [PATCH] 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 --- gst/rtsp-server/rtsp-client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 67dfe831de..18a82da039 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -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);