cURL / Mailing Lists / curl-library / Single Mail

curl-library

Issue with content-type for no content body..

From: sukanya c <sukanya.mc_at_gmail.com>
Date: Tue, 17 Jan 2012 11:39:34 +0530

I work for activesync application that use libcurl for client HTTP
operations.

Exchange server expects http request of Wbxml type only.

Some times, we send request without any content-body.
In such case, libcurl adds "Content-Type:
application/x-www-form-urlencoded\r\n" header field by default.

Exchange server expects no "Content-Type & Content-Length" header fields
if ther is no content body.
Hence, I cannot set the content-type to wbxml, to avoid libcurl adding the
default header.

Now my query is "Why Libcurl adds the default Content-type header field,
eventhough there is no request body ".

Please Clarify & suggest some solution to handle the issue.

Regards
Sukanya

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-17