Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: Simulating --keep-session-cookies wget option with LWP ?

by Corion (Pope)
on Sep 27, 2011 at 11:34 UTC ( #928069=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Simulating --keep-session-cookies wget option with LWP ?
in thread Simulating --keep-session-cookies wget option with LWP ?

Your cookie looks like this:

$VAR1 = [ 0, 'JSESSIONID', '1F627DA1EED0B70CC94F4D3EB9ECD378.host', '/manager', 'host.local', undef, 1, undef, undef, 1, {} ];

The HTTP::Cookies documentation says about the format:

0 version 1 key 2 val 3 path 4 domain 5 port 6 path_spec 7 secure 8 expires 9 discard 10 hash

The ninth parameter, discard is 1 in your cookie. Why do you think that HTTP::UserAgent should save this cookie into a file?

As to your "negative" reputation, your nodes are currently at "-1" and "0" respectively. I downvoted both of them, because you did not do show any relevant code first, and then did no work on making the problem easily reproducible outside your specific environment.


Comment on Re^5: Simulating --keep-session-cookies wget option with LWP ?
Select or Download Code
Re^6: Simulating --keep-session-cookies wget option with LWP ?
by i5513 (Monk) on Sep 27, 2011 at 11:57 UTC
    Hello,

    Thank you clarifying that issue, using ignore_discard attribute in HTTP::cookies, made the code works.

    my $cookie_jar = HTTP::Cookies->new( file => "mycookie-tomcat.cookie", autosave => 1, ignore_discard => 1 );

    I don't know if can be future problems with this option enabled. In my case (pooling tomcat manager I suppose that should not be any problem).

    Thank you again
    PD: I hope this node doesn't appear two times, if so , sorry

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-09-22 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (202 votes), past polls