cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl::easy and cookies over proxy

From: Björn Stenberg <bjorn_at_haxx.se>
Date: Mon, 18 Mar 2002 11:45:46 +0100 (CET)

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

Here's an excerpt of what I'm doing:

----
$curl = Curl::easy::init() or die "curl init failed!\n";
$::errbuf = "";
Curl::easy::setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
Curl::easy::setopt($curl, CURLOPT_ERRORBUFFER, "::errbuf");
Curl::easy::setopt($curl, CURLOPT_WRITEFUNCTION, \&body_callback);
Curl::easy::setopt($curl, CURLOPT_PROXY, "http://int-proxy1:8080");
Curl::easy::setopt($curl, CURLOPT_URL, $url);
Curl::easy::setopt($curl, CURLOPT_FILE, \@body);
Curl::easy::setopt($curl, CURLOPT_COOKIEJAR, \@cookies);
print STDERR "curling $url\n";
if (Curl::easy::perform($curl)) {
    print STDERR "Failed :$::errbuf\n";
}
print STDERR "cookies: @cookies\n";
----
When going through a proxy, @cookies is empty. Without proxy, it works
just fine. Any ideas?
I'm using curl 7.9.5 and Curl::easy 1.20.
-- 
Björn
Received on 2002-03-18