cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl::easy and cookies over proxy

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 18 Mar 2002 14:33:29 +0100 (MET)

On Mon, 18 Mar 2002, Björn Stenberg wrote:

> I'm having problems with cookies when I'm using Curl::easy over a proxy. It
> works fine without proxy.

Forgive me for being ignarant, but I'm a complete rookie on the perl
interface:

> Curl::easy::setopt($curl, CURLOPT_COOKIEJAR, \@cookies);

What is this doing? I'm checking the perl binding source code and I can't see
any particulars that handles CURLOPT_COOKIEJAR differently than libcurl
itself. libcurl assumes a file name to be passed to the CURLOPT_COOKIEJAR
option, and it reads/stores cookies in the given file name...

> print STDERR "cookies: @cookies\n";
>
> When going through a proxy, @cookies is empty. Without proxy, it works just
> fine. Any ideas?

... and the cookie jar file is only written when the curl_easy_cleanup()
function is called...

Other than that, I can't understand why there's a difference between using
proxy and not.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-18