Hi,
I have a question about the HTTP headers. The use case is a file
transfer using multipart form data. We have a custom header to send. For
example Shoe-Size: 10.
When we set this header using:
   list = curl_slist_append(list, "Shoesize: 10");
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
then i notice that the libcurl does not set the Content-Type and
Content-Length: headers.

If i do like this: curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); then
the libcurl sets the content-Type and content-length headers.

How do i let libcurl set my custom header and also set the content header
without explicitly setting the content headers?

If we set some custom header, why does libcurl remove the content headers?

Thanks in advance
Ali
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
  • HTTP headers Ali Nasir via curl-library

Reply via email to