Commit f749145b authored by Per Forlin's avatar Per Forlin Committed by Tim-Philipp Müller

rtspconnection: Replace Auth header instead of append

gst_rtsp_connection_send() adds the Authorization header to the request.
If this function is being called multiple times with the same request
it will add one more Authorization header every time.

To fix to this issue do not append a new Authorization header on
top of an existing ones. Remove any existing Authorization headers first
and then add the new one.

Fixes gst-plugins-good#425
parent a54dbec4
......@@ -1087,6 +1087,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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment