After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750101 - rtspsrc: send the user-agent header
rtspsrc: send the user-agent header
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-29 12:15 UTC by George Kiagiadakis
Modified: 2015-08-16 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (6.12 KB, patch)
2015-05-29 12:15 UTC, George Kiagiadakis
none Details | Review
rtspsrc: send the User-Agent header (6.09 KB, patch)
2015-07-14 17:37 UTC, George Kiagiadakis
none Details | Review
rtspsrc: wrap gst_rtsp_message_init_request in a local function (3.46 KB, patch)
2015-08-14 13:51 UTC, George Kiagiadakis
committed Details | Review
rtspsrc: send the User-Agent header (4.05 KB, patch)
2015-08-14 13:51 UTC, George Kiagiadakis
committed Details | Review

Description George Kiagiadakis 2015-05-29 12:15:25 UTC
Created attachment 304244 [details] [review]
proposed patch

It is useful in certain cases for the server to know the user-agent of the client. This patch adds support in rtspsrc for sending that user-agent string. This string is modifiable by a "user-agent" property and defaults to "GStreamer/<version>"

I noticed there is also bug 614558 related to this, but it's more of a discussion about all network elements in general. This report is specific to rtspsrc.
Comment 1 George Kiagiadakis 2015-07-14 17:37:23 UTC
Created attachment 307419 [details] [review]
rtspsrc: send the User-Agent header

rebased on top of current master
Comment 2 George Kiagiadakis 2015-08-14 12:12:11 UTC
Any comment about this?
Comment 3 Sebastian Dröge (slomo) 2015-08-14 12:17:06 UTC
Review of attachment 307419 [details] [review]:

Looks good except:

::: gst/rtsp/gstrtspsrc.c
@@ +4655,3 @@
+  /* set user-agent */
+  gst_rtsp_message_add_header (&request, GST_RTSP_HDR_USER_AGENT,
+      src->user_agent);

This probably complains if src->user_agent == NULL
Comment 4 George Kiagiadakis 2015-08-14 13:51:05 UTC
Created attachment 309276 [details] [review]
rtspsrc: wrap gst_rtsp_message_init_request in a local  function
Comment 5 George Kiagiadakis 2015-08-14 13:51:37 UTC
Created attachment 309277 [details] [review]
rtspsrc: send the User-Agent header
Comment 6 George Kiagiadakis 2015-08-14 14:01:25 UTC
commit af03341e2600a4ad62543c97ce58001a9374a9d5
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Fri Aug 14 15:42:42 2015 +0200

    rtspsrc: wrap gst_rtsp_message_init_request in a local function

    This will allow adding common request initialization, like the
    user agent string, in just one place.

commit e2f2f087ecd475b9358451a5ca6d002f381da67c
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Fri Aug 14 15:46:53 2015 +0200

    rtspsrc: send the User-Agent header

    Sometimes it is useful to know this information on the
    server side. Other popular implementations (vlc, ffmpeg, ...)
    also send this header on every message.

    This includes a new "user-agent" property that the user
    can set to use a custom User-Agent string. The default
    is "GStreamer/<version>"

    https://bugzilla.gnome.org/show_bug.cgi?id=750101