in reply to LWP connection:keep_alive

One potential problem is that you do not have a Referer: header, which is required by many sites.

The code you posted confused me a bit. You generate a new LWP::UserAgent and then immediately do a POST. Where's the GET that set the cookie?

Replies are listed 'Best First'.
Re^2: LWP connection:keep_alive
by xeroxed_yeti (Initiate) on Jan 02, 2010 at 15:25 UTC

    How do I usually set the cookie? I thought :$agent->cookie_jar( {} ); would do that stuff...

    ...and do I need the GET command when I submit data via POST?

    Setting $agent->default_header('Referer' => 'http:blabla'); also ends with a closed sessionid

    However could that be the result of the missing GET command to set the cookie?