diff --git a/ext/curl/gstcurlhttpsink.c b/ext/curl/gstcurlhttpsink.c index 6fa920ad21..a8d80d28df 100644 --- a/ext/curl/gstcurlhttpsink.c +++ b/ext/curl/gstcurlhttpsink.c @@ -352,10 +352,12 @@ gst_curl_http_sink_set_header_unlocked (GstCurlBaseSink * bcsink) set_headers: - tmp = g_strdup_printf ("Content-Disposition: attachment; filename=" - "\"%s\"", bcsink->file_name); - sink->header_list = curl_slist_append (sink->header_list, tmp); - g_free (tmp); + if (bcsink->file_name) { + tmp = g_strdup_printf ("Content-Disposition: attachment; filename=" + "\"%s\"", bcsink->file_name); + sink->header_list = curl_slist_append (sink->header_list, tmp); + g_free (tmp); + } res = curl_easy_setopt (bcsink->curl, CURLOPT_HTTPHEADER, sink->header_list); if (res != CURLE_OK) { bcsink->error = g_strdup_printf ("failed to set HTTP headers: %s", @@ -399,6 +401,7 @@ gst_curl_http_sink_set_options_unlocked (GstCurlBaseSink * bcsink) parent_class = GST_CURL_TLS_SINK_GET_CLASS (sink); if (g_str_has_prefix (bcsink->url, "https://")) { + GST_DEBUG_OBJECT (bcsink, "setting up tls options"); return parent_class->set_options_unlocked (bcsink); }