diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index d134666002..7926f59e48 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -1088,6 +1088,8 @@ add_auth_header (GstRTSPConnection * conn, GstRTSPMessage * message) g_free (auth_string); auth_string = auth_string2; } + /* Do not keep any old Authorization headers */ + gst_rtsp_message_remove_header (message, GST_RTSP_HDR_AUTHORIZATION, -1); gst_rtsp_message_take_header (message, GST_RTSP_HDR_AUTHORIZATION, auth_string); break;