Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Monks

I have a web page which will change the form action upon submit though javascript. It change from http://url1 to https://url2. I tried to change the form action by

$a->current_form()->action(q{https://url2})

But it always give me 500 error. While accessing the web site with browser is OK.

Any one could help on this?

Thanks.

Edit, BazB: changed title. Added code tags.

Replies are listed 'Best First'.
Re: 500 error when using WWW::Mechanize
by Corion (Patriarch) on Oct 17, 2003 at 08:43 UTC

    There must be still something else that you are missing.

    Your changing of the action looks OK to me, so you should put a http logging proxy inbetween your browser and your net connection and compare that to the requests/content that WWW::Mechanize sends.

    As you don't give more hints, it's hard to be more specific. My best guess is, that some JavaScript sets some other hidden fields that your WWW::Mechanize script dosen't set (yet).

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
      Hi, I use the ethereal sniffer found that, after the syn/ack and client send hello messagem,the server reply a "TLS" error of "handshake Failure". While I'm sending the client Hello message using SSLv2. Will this "SSLv2" and "TLS" match?
Re: 500 error when using WWW::Mechanize
by robartes (Priest) on Oct 17, 2003 at 08:36 UTC
    Your web server error log should give you more information about the cause of the error. Check that first.

    CU
    Robartes- who would also like to point to fatalsToBrowser