cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl::easy and cookies over proxy

From: Cris Bailiff <c.bailiff_at_awayweb.com>
Date: Tue, 19 Mar 2002 19:23:18 +1100

I've attempted to reproduce Bjorn's issue with Curl::easy and a proxy
without any success. "Works for me" My test code is attached.

Daniel is correct about the use of the 'COOKIEJAR' option - it just
takes a filename, like libcurl itself. Nothing magic puts cookies in or
out of an array, so '@cookies' is not going to work. Also, the cookie
jar is not written to disk unless you explicitly call
Curl::easy::cleanup.

Once this is done, cookie.jar works fine with this URL (using curl 7.9.5
and Curl::easy 1.20), with or without the proxy setting configured (our
local test proxy is squid).

Note, that in my tests, neither the test script or curl *send* cookies
to this site, with or without using the proxy. Is that what you
expected? CURLOPT_COOKIEJAR is output only, in my understanding.

Cris Bailiff,
Curl::easy maintainer

Daniel Stenberg wrote:
>
> On Mon, 18 Mar 2002, Björn Stenberg wrote:
>
> > > What if you attempt to do the same operation using the command line?
> >
> > It works just fine. Here's the command line:
> >
> > curl -c cookie.jar -o map.html
> > "http://www.gulasidorna.se/main/search/hits.asp?NewFields=&StartLocation=GeographicMenu&SearchByMap=Yes&StreetName=Kungsgatan&StreetNumber=1&CityName=STOCKHOLM"
> >
> > cookie.jar is created and filled with a bunch of cookies.
>
> Then I'm afraid I have no other advice than to attempt to debug the perl
> interface. What happens and what doesn't happen. I can't see how it can make
> this happen even if it wanted to!
>
> Does it even pass the COOKIEJAR option to libcurl at all?
>
> --
> Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/

Received on 2002-03-19