cURL / Mailing Lists / curl-library / Single Mail


Issue with content-type for no content body..

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

I work for activesync application that use libcurl for client HTTP

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.


List admin:
Received on 2012-01-17