develooper Front page | perl.libwww | Postings from March 2001

Re: LWP and Cookies

Thread Previous
Kai Krebber
March 8, 2001 01:25
Re: LWP and Cookies
Message ID:
Hi, Waseem!

I actually have the same effect. I tried out a sample program from a book 
(Listing 19.5 from 'Perl 5 by Example'; e.g. on the server side) to avoid making a 
conceptual mistake, but cookies still don't work in the client side, using LWP 
(works with Netscape browser though).

I posted a request to this group  on Feb 16th, but never got a response.

So if somebody would have a working sample using cookies with LWP::UserAgent 
(and a http-proxy) that I could try out against an outside Webserver (sample URL 
please too), I would appreceate it. I'm suspecting LWP-cookie handling not to 
work at all (at least not on my SPARC Solaris).


> I am writing a perl script to track tranactions using
> a specific shopping cart, the problem is i using
> LWP::UserAgent to grab the pages and then grab the
> value of the cart before payment (this is a simple
> text processign thing) 
> But if i use the normal site without (LWP) a cookie is
> set, for the shopping cart. But when i use LWP to goto
> the same page as the code shows below, no cookie is
> set thus no items enter the shopping cart . 
> Thus i am using the HTTP:Cookies module thingy but all
> i get in the $cookie_jar is "#LWP-Cookies-1.0". 

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About