Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Problem setting content-type header when connecting to Microsoft Exchange

From: Tomalak Geret'kal via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 8 Oct 2020 00:21:06 +0100

On 08/10/2020 00:06, Jeffrey McKay via curl-library wrote:
> This seems straightforward enough, except that my code *is* explicitly
> setting the content-type header to be
> "text/html; charset=utf-8". I do this via CURLOPT_HTTPHEADER. I have
> checked and re-checked, and there is no doubt
> that the curl_slist contains that header. Further proof is that when I
> use this code to connect to outlook.office365.com,
> it works fine and I can see the header in the returned feed, e.g.:
>
> Host: outlook.office365.com
> User-Agent: comaxis-agent/1.0
> Accept: */*
> X-AnchorMailbox: jjones_at_transend.onmicrosoft.com
> X-PreferServerAffinity: true
> Content-Type: text/xml; charset=utf-8
> Content-Length: 914

You could still have undefined behaviour.

You should post a complete program that reproduces the
behaviour, that we can look at and check for mistakes.

Cheers

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-08