curl-library
Re: Question about Content-type: multipart
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 7 Mar 2016 09:53:01 +0100 (CET)
Date: Mon, 7 Mar 2016 09:53:01 +0100 (CET)
On Mon, 7 Mar 2016, Waitman Gobble wrote:
> Sorry, original post doesn't show but i did add it in
> long post_size;
> post_size = ftell(fp);
>
> curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, post_size);
But you overrode that value yourself in the request:
> std::string cl = "Content-Length: " + std::to_string(post_size);
> chunk = curl_slist_append(chunk, cl.c_str());
> curl_easy_setopt(conn, CURLOPT_HTTPHEADER, chunk);
... so if there's a wrong Content-Length: in the request, you put it there.
Didn't you?
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-03-07