mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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
This commit is contained in:
parent
0bec36d5fa
commit
76aa92be51
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue