Hi luli,
I saw your post at libwww mail list but no answer.
It's an old post but it's the closest thing in the archives to my issue.
I have a similar problem where the page sets a client cookie and I need to
set it in LWP, but I can't seem to confirm that the cookies are being sent.
Did you finally figure out a workaround?
Here's my debug code:
#view cookies
my $cookieJar = $ua->cookie_jar;
$cookieJar->set_cookie('0', 'myClientSideTestCookie', '', '\/',
'www5.somesite.ca', '', '', '0', '', '', {} );
$cookieJar->add_cookie_header($req);
my $cookieDump = $cookieJar->as_string;
print "cookies are: $cookieDump \n";
I can see the session cookies set by the server, but not the one I created.
Any tips you can scrape up will be gratefully accepted.
-richard
------ original message --------
hi,all
i am using lwp to browse web.
i meet a big problem,
i post my id & password to some URL,
i get this content:
<html>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel=stylesheet type=text/css href='/bbs.css'>
<script>document.cookie='utmpnum=228'</script>
<script>document.cookie='utmpkey=87655926'</script>
<script>document.cookie='utmpuserid=aaaa'</script>
<meta http-equiv='Refresh' content='0; url=/index.html'>
i know, this javascript create cookie on client.
can u tell me how i create this cookie like javascript?
luli