in reply to LWP and Javascript

Are you double extra certain that any cookies you received from the http: request are getting passed back via the https: request? I see that you're hooking up the cookie jar, but you don't show code that populates it.

You might need to forge a Referer string. Some sites like to check that what's on the client end at least pretends to be a browser.

Replies are listed 'Best First'.
More forging:
by Dog and Pony (Priest) on Feb 08, 2002 at 12:45 UTC
    You might need to fake the browser too, at my banking site I can more or less only access with Internet explorer, but if I tell Opera to pretend to be "Internet Explorer", it all works well. I see you do this:

    $ua->agent("Mozilla/8.0"); # pretend we are very capable browser

    This might very well be overdoing it, by pretending to be this "very capable browser", you are also pretending to be a non-existing browser, at least as far as the site is concerned. Lots of poorly written controls, both in javascript and in server-side code doesn't really check if your browser can handle what it needs to, only if it is "the most common one(s)". This is of course, the easy way out for lazy (false laziness) programmers, and it will almost always come back to haunt them or whoever gets to maintain the code.

    I'd suggest that you copy the User-Agent header verbatim from a browser that you know works on that site, such as (most likely) Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) - even if you rather want to be the meanest browser on the block :)