mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 20:06:21 +00:00
http upload: use correct content type
This bug was introduced in 1ec606540e when
`g_strdup_printf` was used instead of `asprintf`.
Problem discoverd by raspeguy.
Mistake discovered by optmzr and Martin.
Thanks to everybody involved!
This commit is contained in:
@@ -194,7 +194,7 @@ http_file_put(void* userdata)
|
|||||||
|
|
||||||
struct curl_slist* headers = NULL;
|
struct curl_slist* headers = NULL;
|
||||||
content_type_header = g_strdup_printf("Content-Type: %s", upload->mime_type);
|
content_type_header = g_strdup_printf("Content-Type: %s", upload->mime_type);
|
||||||
if (content_type_header) {
|
if (!content_type_header) {
|
||||||
content_type_header = g_strdup(FALLBACK_CONTENTTYPE_HEADER);
|
content_type_header = g_strdup(FALLBACK_CONTENTTYPE_HEADER);
|
||||||
}
|
}
|
||||||
headers = curl_slist_append(headers, content_type_header);
|
headers = curl_slist_append(headers, content_type_header);
|
||||||
|
|||||||
Reference in New Issue
Block a user