GNOME Bugzilla – Bug 758921
rtspsrc should use lowercase X-Sessioncookie header for compatibility with strict servers
Last modified: 2015-12-07 09:56:17 UTC
Consider a case where you are streaming RTSP over HTTP with a camera using the following pipeline: gst-launch-1.0 rtspsrc location="rtsph://user:password@192.168.105.64:80/rtsp_tunnel" short-header=true ! decodebin ! fakesink dump=true I found that the some Bosch cameras are unable locate my my X-Sessioncookie and the connection fails. After debugging for some time, I found that the connection completes successfully if I change the capitalization of X-Sessioncookie to x-sessioncookie, which is a bit odd because I thought these headers are supposed to be capitalization agnostic. The server must be doing a case-sensitive parse. Quicktime and VLC both use the lowercase version "x-sessioncookie" and it is shown as lowercase in Apple's spec on how to do RTSP over HTTP (http://www.opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-412.42/Documentation/RTSP_Over_HTTP.pdf). For compatibility with servers that are incorrectly strict, I suggest that we do the same...provided of course that this won't break other servers that expect it to be capitalized as we have it now. Please let me know your thoughts on this issue.
If other software is doing the same, we should probably also do it. It's annoying but what can we do? :) Please also report this to Bosch though. Do you want to provide a patch?
Created attachment 316658 [details] [review] Update capitalization of X-Sessioncookie to x-sessioncookie Absolutely, here is a patch. I have also reported this parsing quirk to Bosch.
commit e47643122c6d49b0633e53c5ea226fc898146f62 Author: Evan Callaway <evan.callaway@ipconfigure.com> Date: Wed Dec 2 09:00:31 2015 -0500 rtspconnection: Update capitalization of x-sessioncookie Some servers incorrectly parse header names with strict case-sensitivity. For compatibility with these systems change X-Sessioncookie to x-sessioncookie. https://bugzilla.gnome.org/show_bug.cgi?id=758921