cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Need ur help ASAP

From: Anjalinbenedicta J <anjalinbenedicta.j_at_tcs.com>
Date: Thu, 1 Apr 2010 12:35:58 +0530

Hi Toby,
 
Thanks for the updates,
 
We havent set the option for Http headers..yet it is going through checkheaders.
 
The below options have been set in the Curl handle for URL Request
 
Block 1:
 
         This block is used for both xml request as well as URL request
 
        curl_easy_setopt(m_curl, CURLOPT_HEADER, 0);
        curl_easy_setopt(m_curl, CURLOPT_NOSIGNAL, 1);
         curl_easy_setopt(m_curl, CURLOPT_DNS_CACHE_TIMEOUT, gDNStimeoutSeconds );
         curl_easy_setopt(m_curl, CURLOPT_SHARE, gCurlShared);
        curl_easy_setopt(m_curl, CURLOPT_TCP_NODELAY, 1);
        m_curlErrorMessage = new char [CURL_ERROR_SIZE + 1];
        *m_curlErrorMessage = 0;
        curl_easy_setopt(m_curl, CURLOPT_ERRORBUFFER, m_curlErrorMessage);
        curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, receive_callback);
        curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, this);

        curl_easy_setopt(m_curl, CURLOPT_SSL_VERIFYPEER, 0);
        curl_easy_setopt(m_curl, CURLOPT_SSL_VERIFYHOST, 0);
        curl_easy_setopt(m_curl, CURLOPT_CAINFO, "./curl-ca-bundle.crt");
        // Start defining the attribute lists for xml sends
        m_xml_list = 0;
        m_xml_list = curl_slist_append(m_xml_list, "Content-Type: application/x-www-form-urlencoded");
        m_xml_list = curl_slist_append(m_xml_list, "Expect:");
 
Block 2:
        This block is used for URL Request.
        curl_easy_setopt(m_curl, CURLOPT_URL, url);
        curl_easy_setopt(m_curl, CURLOPT_HTTPGET, 1);
        curl_slist_free_all(m_xml_list); /* free the header list */
 
Block 3:
        This block is used for both xml and url request
        curl_easy_setopt(m_curl, CURLOPT_TIMEOUT, (timeLeft + 500 ) / 1000);
        res = curl_easy_perform(m_curl);
 
 
Please do correct us where we have gone wrong
Regards,
Anjalin

-----Toby Peterson wrote: -----
To: libcurl development <curl-library@cool.haxx.se>
From: Toby Peterson <toby@apple.com>
Date: 04/01/2010 12:26PM
cc: Anjalinbenedicta J <anjalinbenedicta.j@tcs.com>
Subject: Re: Need ur help ASAP

On Mar 31, 2010, at 11:40 PM, Anjalinbenedicta J wrote:

> We are able to see the below logs dummped as core when our system crash..
>  
>  fe2e95a8 strncasecmp (260000, fec44880, b, fe2d6eb0, d4e3c, fe33ee44) + 30
>  feb5ddc8 curl_strnequal (260000, fec44880, b, 80808080, ff00, 80808080) + 48
>  feb2e62c checkheaders (f15e0, fec44880, ffffffff, fffffff8, 0, bd029) + 6c
>  feb32388 Curl_http (bd090, eeffafc2, eeffaf4b, eeffaf4a, 3, fe3c1910) + 258
>  feb4952c Curl_do  (eeffafc8, eeffafc2, fe3c3800, 0, eff08200, fee5e5e8) + 84
>  feb5d73c Curl_perform (f15e0, d, eeffb094, eeff90b8, fee4059c, 11) + 11c
>  feb5e6b0 curl_easy_perform (f15e0, d, 1e, 0, 1, 10624c00) + 138
> Can you please help us in getting out of this issue

Looks like you handed something bogus to CURLOPT_HTTPHEADER.

- Toby
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


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