cURL / Mailing Lists / curl-library / Single Mail

curl-library

Disabling headers selectively

From: Farhad Tarapore <bilaribilari_til_at_yahoo.com>
Date: Tue, 17 Oct 2006 21:34:10 -0700 (PDT)

Hello,
I am using libCurl in an application. The server to which I am sending the requests is an HTTP1.1 server. The expect100() function in http.c sends the "Expect:100-continue" header in its requests. Due to this the server returns something (I don't know what) and Curl gives CURLE_GOT_NOTHING (52).
As soon as I disable the sending of the Expect header, things work fine.
I have read in the page for curl_set_opt() that I should "use CURLOPT_HTTPHEADER to disable it as usual", but I don't see anything very usual about it since I only want to disable the Expect:100-continue header and not the rest of the headers that are present in the POST request.
So please provide some example of how this can be done. For the time-being to make things work, I have had to comment out sending of the Expect header completely. Also tell me how this impacts requests depending on various server behaviours.
Thank you and best regards,
B.

                 
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
Received on 2006-10-18