cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Perl multicurl

From: Kenny Billiau <kenny.billiau_at_ugent.be>
Date: Fri, 8 May 2009 15:13:42 +0200 (CEST)

On Fri, 8 May 2009, Balint Szilakszi wrote:

> Daniel Stenberg wrote:
>> On Fri, 8 May 2009, kenny.billiau_at_ugent.be wrote:
>>
>> > [dave_at_hal ~]$ curl-config --version
>> > libcurl 7.15.5
>>
>> Then allow me to guess that the problem is found in this description:
>>
>> Strings passed to libcurl as char * arguments, are copied by
>> the
>> library; thus the string storage associated to the pointer
>> argument may
>> be overwritten after curl_easy_setopt() returns. Exceptions to
>> this
>> rule are described in the option details below.
>>
>> NOTE: before 7.17.0 strings were not copied. Instead the user
>> was
>> forced keep them available until libcurl no longer needed them.
>>
>
> WWW:: Curl 4.06 should have fixed that problem. I'd be very interested to
> WWW:: find out why it doesn't work in this case.

The strangest thing happened. The code works now!
The only thing I did, was asking IT to install WWW::Curl::Simple, so I assume this also upgraded WWW::Curl to 4.06. So I tried to confirm this by installing everything from scratch on another server. Identic configuration, but no WWW::Curl installed.

After installing WWW::Curl::Easy through CPAN I noticed it uses WWW::Curl 4.05 and not 4.06.
Then I installed WWW::Curl::Multi but this did not upgrade WWW::Curl to 4.06!
These are the last lines of the output of the CPAN installation:

[...]
Writing /usr/lib/perl5/site_perl/5.10.0/auto/WWW/Curl/.packlist
Appending installation info to /usr/lib/perl5/core_perl/perllocal.pod
   SZBALINT/WWW-Curl-4.05.tar.gz
   /usr/bin/make install -- OK

cpan[2]> install WWW::Curl::Multi
WWW::Curl::Multi is up to date (undef).

cpan[3]> i WWW::Curl::Multi
Module id = WWW::Curl::Multi
     CPAN_USERID SZBALINT (Balint Szilakszi <szbalint_at_cpan.org>)
     *CPAN_VERSION undef*
     CPAN_FILE S/SZ/SZBALINT/WWW-Curl-4.06.tar.gz
     UPLOAD_DATE 2009-04-06
     INST_FILE /usr/lib/perl5/site_perl/5.10.0/WWW/Curl/Multi.pm
     *INST_VERSION undef*

cpan[4]> i WWW::Curl::Easy
Module id = WWW::Curl::Easy
     CPAN_USERID SZBALINT (Balint Szilakszi <szbalint_at_cpan.org>)
     *CPAN_VERSION 4.05*
     CPAN_FILE S/SZ/SZBALINT/WWW-Curl-4.05.tar.gz
     UPLOAD_DATE 2008-07-05
     INST_FILE /usr/lib/perl5/site_perl/5.10.0/WWW/Curl/Easy.pm
     *INST_VERSION 4.05*

cpan[5] install WWW::Curl::Simple
Cannot determine perl version info from lib/WWW/Curl/Simple.pm
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::More ...loaded. (0.72)
- WWW::Curl ...missing. *(would need 4.06)*
- Moose ...missing. (would need 0.50)
- MooseX::AttributeHelpers ...missing.
- HTTP::Request ...missing.
- namespace::clean ...missing.
...

Installing WWW::Curl::Simple does install the latest WWW::Curl, which apparently completely solves the previous problems I had.

> Kenny, could you test with a libcurl version >7.17.0 to confirm that this is
> indeed the cause?

> Regards,
> Balint Szilakszi

Thx for all the help! The simple pointers really helped me on my way.

kind regards,
Kenny
Received on 2009-05-08