Advertisement

02.24.2005 at 10:00AM PST, ID: 21327869
[x]
Attachment Details

Sharing cookie information with libcurl handles

Asked by timdr in Perl Programming Language

Tags: libcurl, cookie

I'm using the libcurl library with Perl, and have a need to use multiple curl handles. For example:

-----
#!/wms/bin/perl

use WWW::Curl::easy;

my $curl1 = WWW::Curl::easy->new();
my $curl2 = WWW::Curl::easy->new();
------

Unfortunately, each of these curl handles uses its own set of cookies. I need to share the cookie information between the two handles. I know that with the regular C libcurl library you can, but the perl interface doesn't seem to have access to it.

I am looking for either someone that knows how to access this interface through perl, or knows a another way to do this.

Some things to note:
- Using the COOKIEJAR or COOKIEFILE doesn't seem to help with this problem.
- The option to do this C is called CURLOPT_SHARE, but doesn't seem to do anything using it in Perl.
- In the real application, each curl handle is in its own thread. So the solution must be thread safe.

{{500 points refunded - PAQ - jmcg - EE Page Editor for Perl}}Start Free Trial
 
Loading Advertisement...
 
[+][-]02.27.2005 at 08:35PM PST, ID: 13417310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.01.2005 at 10:52AM PST, ID: 13432179

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.01.2005 at 03:20PM PST, ID: 13434773

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.02.2005 at 11:56AM PST, ID: 13443341

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.02.2005 at 10:46PM PST, ID: 13447126

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.04.2005 at 09:35AM PST, ID: 13460767

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: libcurl, cookie
Sign Up Now!
Solution Provided By: timdr
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32