rtspconnection: do not duplicate authentication headers
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 10 Oct 2018 21:15:49 +0000 (23:15 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Thu, 11 Oct 2018 13:35:56 +0000 (15:35 +0200)
rtsp_connection_send takes care of adding those already,
and some reverse proxies such as nginx will reject the request
altogether if the Authorization header is present twice,
even with the same value.

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

gst-libs/gst/rtsp/gstrtspconnection.c

index 419d543..d134666 100644 (file)
@@ -769,7 +769,6 @@ setup_tunneling (GstRTSPConnection * conn, GTimeVal * timeout, gchar * uri,
   gst_rtsp_message_add_header (msg, GST_RTSP_HDR_CACHE_CONTROL, "no-cache");
   gst_rtsp_message_add_header (msg, GST_RTSP_HDR_PRAGMA, "no-cache");
   gst_rtsp_message_add_header (msg, GST_RTSP_HDR_HOST, host);
-  add_auth_header (conn, msg);
 
   /* we need to temporarily set conn->tunneled to FALSE to prevent the HTTP
    * request from being base64 encoded */
@@ -851,7 +850,6 @@ setup_tunneling (GstRTSPConnection * conn, GTimeVal * timeout, gchar * uri,
       "Sun, 9 Jan 1972 00:00:00 GMT");
   gst_rtsp_message_add_header (msg, GST_RTSP_HDR_CONTENT_LENGTH, "32767");
   gst_rtsp_message_add_header (msg, GST_RTSP_HDR_HOST, host);
-  add_auth_header (conn, msg);
 
   /* we need to temporarily set conn->tunneled to FALSE to prevent the HTTP
    * request from being base64 encoded */