From e9ef3cf1d26400b47a276c758edc87e15e2de50a Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 2 Jun 2021 15:29:32 +0200 Subject: [PATCH] http upload: use correct content type This bug was introduced in 1ec606540eb0f474f3d968d3566a7c56d778a367 when `g_strdup_printf` was used instead of `asprintf`. Problem discoverd by raspeguy. Mistake discovered by optmzr and Martin. Thanks to everybody involved! --- src/tools/http_upload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c index 17eca188..d1360b46 100644 --- a/src/tools/http_upload.c +++ b/src/tools/http_upload.c @@ -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);