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 774806 - user-agent duplicated in rtspsrc header
user-agent duplicated in rtspsrc header
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 772043 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-11-21 17:53 UTC by Stuart
Modified: 2018-11-03 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Quick work around fix (722 bytes, patch)
2016-11-21 17:53 UTC, Stuart
none Details | Review

Description Stuart 2016-11-21 17:53:42 UTC
Created attachment 340464 [details] [review]
Quick work around fix

The commit from:

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

causes rtspsrc to add two 'user-agents' to the rtsp header.

This causes problems with some rtsp servers (tested with Panasonic cameras) as they reply back 400 (Bad Request) and hence the stream does not connect (viewable in logs as well as wireshark).

I've tested with v1.6, however, believe the issue to remain in master (I'll try and get round to testing with master when I can!).

It appears that gst_rtsp_ext_list_before_send() does not check whether any initialisation has been done already and hence just adds what it gets from the iface.

So far I've just added some code to check if there's multiple GST_RTSP_HDR_USER_AGENT's in the message header in gst_rtspsrc_try_send() and remove the header value if needed. A better solution would be to add functionality to either have gst_rtsp_ext_list_before_send() check whether something has been already initialised, or check against rtsp_headers[] to see if there are multiples of headers when there shouldn't be and remove the latest. 

Any pointers would be helpful on where best to implement this!

Cheers,
Stu
Comment 1 Sebastian Dröge (slomo) 2016-11-22 11:05:14 UTC
Who would've added the user agent before that function already? Which code?
Comment 2 Stuart 2016-11-23 10:54:02 UTC
Hi Sebastian,

It's a case that gst_rtsp_ext_list_before_send() does not take into account anything initialised already. With a couple of prints and gst_rtsp_message_dump() around the gst_rtsp_ext_list_before_send() in gst_rtspsrc_try_send(), we get the following:


Message dump BEFORE gst_rtsp_ext_list_before_send():

RTSP request message 0x7fedb4898c80
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://192.168.0.54:554/MediaInput/h264'
   version: '1.0'
 headers:
   key: 'User-Agent', value: 'GStreamer/1.6.3'
 body:


Message dump AFTER gst_rtsp_ext_list_before_send():

RTSP request message 0x7fedb4898c80
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://192.168.0.54:554/MediaInput/h264'
   version: '1.0'
 headers:
   key: 'User-Agent', value: 'GStreamer/1.6.3'
   key: 'User-Agent', value: 'RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)'
   key: 'ClientChallenge', value: '9e26d33f2984236010ef6253fb1887f7'
   key: 'CompanyID', value: 'KnKV4M4I/B2FjJ1TToLycw=='
   key: 'GUID', value: '00000000-0000-0000-0000-000000000000'
   key: 'RegionData', value: '0'
   key: 'PlayerStarttime', value: '[28/03/2003:22:50:23 00:00]'
   key: 'ClientID', value: 'Linux_2.4_6.0.9.1235_play32_RN01_EN_586'
 body:


I've narrowed it down to the call to iface->before_send (ext, req) in gst_rtsp_extension_before_send(), but unsure where to go from there.
Comment 3 Sebastian Dröge (slomo) 2017-05-08 13:06:21 UTC
*** Bug 772043 has been marked as a duplicate of this bug. ***
Comment 4 GStreamer system administrator 2018-11-03 15:14:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/327.