From: Sebastian Rasmussen Date: Tue, 13 Jan 2015 14:29:29 +0000 (+0100) Subject: Revert "rtsp-session-pool: Make sure session IDs are properly URI-escaped" X-Git-Tag: 1.19.3~495^2~707 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=94f3e18c5bb2d8a054ab3b3d4828b9c77fd7f398;p=platform%2Fupstream%2Fgstreamer.git Revert "rtsp-session-pool: Make sure session IDs are properly URI-escaped" This reverts commit 935e8f852d050b4939f1d0f44b38e9b55a2fbe36. RFC 2326 states that session IDs may consist of alphanumeric as well as the safe characters $-_.+ -- N.B. the percent character is not allowed. Previously the session ID was URI-escaped, this meant that any character which was not alphanumeric or any of the characters +-._~ would be percent encoded. While the RFC (surprisingly) mentions that linear white space in session IDs should be URI-escaped, it does not say anything about other characters. Moreover no white space is allowed in the session ID. Finally the percent character which is the result of URI-escaping is not allowed in a session ID. So there is no reason to do any URI-escaping, and now it is removed. https://bugzilla.gnome.org/show_bug.cgi?id=742869 --- diff --git a/gst/rtsp-server/rtsp-session-pool.c b/gst/rtsp-server/rtsp-session-pool.c index fad5288..772390f 100644 --- a/gst/rtsp-server/rtsp-session-pool.c +++ b/gst/rtsp-server/rtsp-session-pool.c @@ -317,7 +317,7 @@ gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid) static gchar * create_session_id (GstRTSPSessionPool * pool) { - gchar id[17]; + gchar id[16]; gint i; for (i = 0; i < 16; i++) { @@ -325,9 +325,8 @@ create_session_id (GstRTSPSessionPool * pool) session_id_charset[g_random_int_range (0, G_N_ELEMENTS (session_id_charset))]; } - id[16] = 0; - return g_uri_escape_string (id, NULL, FALSE); + return g_strndup (id, 16); } static GstRTSPSession *