cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Libcurl Dying at Perform()

From: Jean-Philippe Barette-LaPierre <jpbarrette_at_gmail.com>
Date: Thu, 13 Aug 2009 11:15:04 -0400

On Thu, Aug 13, 2009 at 10:57 AM, Brandon Tate <brandonntate_at_gmail.com>wrote:

> I've inherited a paypal gateway that needs to be upgraded to use curl
> instead of the soon to be obsolete sdk. I'm having an issue where my cgi
> dies at perform() with no error thrown. I'm using curlpp, but have
> attempted with plain libcURL with same results. First and foremost, I'm
> getting a warning at compilation that could be the source of the trouble.
>
> /usr/bin/ld: warning: libssl.so.2, needed by
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libcurl.so, may conflict
> with libssl.so.4
> /usr/bin/ld: warning: libcrypto.so.2, needed by
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libcurl.so, may conflict
> with libcrypto.so.4
> cp testing.cgi /www/cgi-ssl/admin/
>
> I don't know how I would go about fixing that, I had absolutely no part in
> configuring this server and I don't think any of it's been touched since
> 2003.
>

Brandon did send an email on curlpp mailing-list, but I was concerned about
the linking issues. If you guys don't see any problems there, we'll (the
cURLpp crew),
handle the cURLpp part.

>
> I'm on a tight deadline here and am completely stumped. Any help would be
> greatly appreciated. Here's some cURL code:
>
> //set the headers.
> std::list<std::string> headers;
> headers.push_back("Content-Type: text/namevalue");
> headers.push_back("Content-Length: " +
> verisignArgs.GetLength());
> headers.push_back("X-VPS-Timeout: 45");
> headers.push_back("X-VPS-Request_ID:" +
> std::string(uniqueID));
>
> AddLogEntry(dbObjPtr, "INFO\tVerisign.cc\tRest Of Headers Set");
>
> AddLogEntry(dbObjPtr, "INFO\tVerisign.cc\tInit Curl");
> //cURLpp::Cleanup myCleanup;
> cURLpp::Easy myRequest;
> myRequest.setOpt(new cURLpp::Options::Url(kVerisignHost));
> myRequest.setOpt(new cURLpp::Options::Port(kVerisignPort));
> myRequest.setOpt(new
> cURLpp::Options::Timeout(kVerisignTimeout));
> myRequest.setOpt(new cURLpp::Options::Header(1));
> myRequest.setOpt(new cURLpp::Options::FollowLocation(0));
> myRequest.setOpt(new cURLpp::Options::SslVerifyPeer(0));
> myRequest.setOpt(new cURLpp::Options::SslVerifyHost(2));
> myRequest.setOpt(new cURLpp::Options::ForbidReuse(true));
> myRequest.setOpt(new cURLpp::Options::Post(1));
> myRequest.setOpt(new cURLpp::Options::HttpHeader(headers));
> myRequest.setOpt(new
> cURLpp::Options::PostFields(std::string(verisignArgs)));
> myRequest.setOpt(new cURLpp::Options::UserAgent("Mozilla/5.0
> (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/200
> 70725 Firefox/2.0.0.6"));
>
> std::ostringstream responseBuffer;
> //AddLogEntry(dbObjPtr, "INFO\tVerisign.cc\tSet up output stream. About to
> perform shorthand version");
> //responseBuffer << myRequest;
>
> //cURLpp::Options::WriteStream ws(&responseBuffer);
> //myRequest.setOpt(ws);
> AddLogEntry(dbObjPtr, "INFO\tVerisign.cc\tSet up output stream. About to
> perform");
> cout << "Content-type: text/plain" << endl << endl;
> myRequest.perform();
>
Received on 2009-08-13