mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
curlhttpsink: Support for multipart/form-data Content-Type
Add support to set multipart/form-data as Content-Type by sending a caps event to the curlhttpsink with a field named "boundary". https://bugzilla.gnome.org/show_bug.cgi?id=796618
This commit is contained in:
parent
0af199e25e
commit
d74ceb343a
1 changed files with 10 additions and 1 deletions
|
@ -466,7 +466,16 @@ gst_curl_http_sink_set_mime_type (GstCurlBaseSink * bcsink, GstCaps * caps)
|
|||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
mime_type = gst_structure_get_name (structure);
|
||||
sink->content_type = g_strdup (mime_type);
|
||||
|
||||
if (!g_strcmp0 (mime_type, "multipart/form-data") &&
|
||||
gst_structure_has_field_typed (structure, "boundary", G_TYPE_STRING)) {
|
||||
const gchar *boundary;
|
||||
|
||||
boundary = gst_structure_get_string (structure, "boundary");
|
||||
sink->content_type = g_strconcat (mime_type, "; boundary=", boundary, NULL);
|
||||
} else {
|
||||
sink->content_type = g_strdup (mime_type);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue