1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04: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:
Michael Vetter 2021-06-02 15:29:32 +02:00
parent 78447927eb
commit e9ef3cf1d2

View File

@ -194,7 +194,7 @@ http_file_put(void* userdata)
struct curl_slist* headers = NULL;
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);
}
headers = curl_slist_append(headers, content_type_header);