### part of $reqObj containing 'cookie' (taken from debugging)sub call_httpd_exec{ use LWP::UserAgent; use HTTP::Cookies; my $user_agent = LWP::UserAgent->new; ###cookie handling $user_agent->cookie_jar(HTTP::Cookies->new()); $cookie_list = $hash->{cookies}; my $path; my $cookie; my $cookie_url_obj = URI->new($hash->{url}); foreach $cookie (split(/;/,$cookie_list)) { $path=""; my ($key,$value); if ($cookie =~ /=/){ $key = $`; $value = $'; } $user_agent->cookie_jar->set_cookie(0,$key,$value,"/$path" +,$cookie_url_obj->host); } $reqObj = new HTTP::Request($method,$urlObj,$hdrObj,$cgi_param); $resObj = $user_agent->request($reqObj); my $cookies_new = $user_agent->cookie_jar->as_string; }
### the cookie as it appears in firefox'_headers' => HTTP::Headers=HASH(0xa313f2c) 'accept' => 'application/pdf, image/gif, image/x-xbitmap, ima +ge/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd. +ms-excel, application/msword, */*' 'accept-language' => 'en-us' 'cache-control' => 'no-cache' 'connection' => 'Keep-Alive' 'cookie' => 'Safari=cookieversion=2&portal=proquest&key=28C4E +E2EC2EFBDF1267FF592AAD06A5BAE28C372EF649FA2330F854B8672810B0063D8E5A8 +E98CB62C04AE2C7B9BA3CF148D6991A177D401FB48505D6F8A7A89C89BA42D8CF6F79 +7869A9946885022A0F3066521D43FAC3E1AAFCA769B525590&sessionid=5b172b6b- +092a-48a4-8b84-81ee5f1892e6&ref=Undefined&oref=%2f' 'cookie2' => '$Version="1"' 'soapaction' => ' ' 'user-agent' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows +NT 5.0)' '_method' => 'GET' '_protocol' => undef
Cookie: s_cc=true; s_sq=%5B%5BB%5D%5D; Safari=cookieversion=2&portal=p +roquestcombo&key=64557762631998E5DD4D23ABF32D1C0FCEAA96D75669DF33AEFC +D5004C989B6082ACAEDCFD96951AE809EBAFFDFBED8048F28F2E9B20EC2F22865FC07 +FAD7F31B7916ECFF69E6EBB6AA5C07F7C74E346A506E0F1C58BD71AB7ECEE419D1739 +E4EA308D&sessionid=f2281fc8-facd-4ea6-ab1e-68daacfcbceb&ref=Undefined +&logged=true&oref=%2f; State=aph=PZURKFXQXnYHVSNRRMPjVILBBZANIEHFVCNf +oZGYRXVVCLASVDKBWKHATBMV&rememberpassword=&uicode=proquest&PromoCode= +&itemsperpage=20&portal=proquestcombo
In reply to Re^2: multiple cookies in LWP HTTP:Cookies
by RinaR
in thread multiple cookies in LWP HTTP:Cookies
by RinaR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |