|
Re: Download manager - problem solved: msg#00037lang.perl.modules.lwp
From: "Gisle Aas" <gisle@xxxxxxxxxxxxxxx> Just enable the cookie jar, with $ua->cookie_jar({}), and LWP will manage the cookies for you. -- Ok, I have tried that, but it still doesn't work as I want. I would like to do something like the following code does in case the $request and $response vars are initialised: #Send the cookies to the site: if (-e $cookies_file) { $cookie_jar -> load($cookies_file); $cookie_jar->add_cookie_header($request); } #Get the cookies if($cookies_file) { $cookie_jar->extract_cookies($response); $cookie_jar -> save($cookies_file); } If I just use the following code, this doesn't save a cookies.txt file: my $cookies_file = "cookies.txt"; $cookie_jar = HTTP::Cookies -> new(3, $cookies_file, autosave => 1, ignore_discard => 1); $ua->cookie_jar({}); Thank you. Teddy |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Download manager - problem solved: 00037, Gisle Aas |
|---|---|
| Next by Date: | / uri escaped in LWP::Protocol::file: 00037, Moshe Kaminsky |
| Previous by Thread: | Re: Download manager - problem solvedi: 00037, Gisle Aas |
| Next by Thread: | / uri escaped in LWP::Protocol::file: 00037, Moshe Kaminsky |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |