Remove duplicate 'Content-Length' field in rtsp message. 05/178405/4 accepted/tizen/5.0/unified/20181102.024324 accepted/tizen/unified/20180514.094053 submit/tizen/20180511.004510 submit/tizen_5.0/20181101.000006
authorHyunsoo Park <hance.park@samsung.com>
Thu, 10 May 2018 02:16:59 +0000 (11:16 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Thu, 10 May 2018 11:09:58 +0000 (20:09 +0900)
When negotiating, 'GET_PARAMETER', 'SET_PARAMETER' steps sends 'Content-Length' field two times.

'Content-Length' is already included on base rtsp(gst-plugins-base).
But we added it one more time when inherited plugin makes messges. So i remove it.

Change-Id: I81061310ac4a5fce99e431d40049885a69b85c86
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
gst/rtsp-server/rtsp-client-wfd.c
packaging/gst-rtsp-server.spec

index 75fdaa5..96cb419 100644 (file)
@@ -2770,18 +2770,9 @@ gst_prepare_request (GstRTSPWFDClient * client, GstRTSPMessage * request,
       g_string_append_printf (msglength, "%d", msglen);
       GST_DEBUG ("M3 server side message body: %s", msg);
 
-      /* add content-length type */
-      res =
-          gst_rtsp_message_add_header (request, GST_RTSP_HDR_CONTENT_LENGTH,
-          g_string_free (msglength, FALSE));
-      if (res != GST_RTSP_OK) {
-        GST_ERROR_OBJECT (client, "Failed to add header to rtsp message...");
-        goto error;
-      }
-
       res = gst_rtsp_message_set_body (request, (guint8 *) msg, msglen);
       if (res != GST_RTSP_OK) {
-        GST_ERROR_OBJECT (client, "Failed to add header to rtsp message...");
+        GST_ERROR_OBJECT (client, "Failed to set body data to rtsp message...");
         goto error;
       }
 
@@ -2809,18 +2800,9 @@ gst_prepare_request (GstRTSPWFDClient * client, GstRTSPMessage * request,
       g_string_append_printf (msglength, "%d", msglen);
       GST_DEBUG ("M4 server side message body: %s", msg);
 
-      /* add content-length type */
-      res =
-          gst_rtsp_message_add_header (request, GST_RTSP_HDR_CONTENT_LENGTH,
-          g_string_free (msglength, FALSE));
-      if (res != GST_RTSP_OK) {
-        GST_ERROR_OBJECT (client, "Failed to add header to rtsp message...");
-        goto error;
-      }
-
       res = gst_rtsp_message_set_body (request, (guint8 *) msg, msglen);
       if (res != GST_RTSP_OK) {
-        GST_ERROR_OBJECT (client, "Failed to add header to rtsp message...");
+        GST_ERROR_OBJECT (client, "Failed to set body data to rtsp message...");
         goto error;
       }
 
index 674c04c..c17c732 100644 (file)
@@ -1,7 +1,7 @@
 Name:       gst-rtsp-server
 Summary:    Multimedia Framework Library
 Version:    1.12.2
-Release:    2
+Release:    3
 Url:        http://gstreamer.freedesktop.org/
 Group:      System/Libraries
 License:    LGPL-2.0+