develooper Front page | perl.libwww | Postings from December 2003

found my mech problem

Thread Next
From:
Gedanken
Date:
December 23, 2003 10:38
Subject:
found my mech problem
Message ID:
Pine.LNX.4.44.0312231232100.25504-100000@hagbard.io.com

well the partial page truncation was a red herring.  the real problem ius 
that *something* in my setup is translating the action of the form into 
garbage.

the following code snippet will fail:

$agent->form(1);
$agent->submit();

because, unbeknownst to me, the action for that form happened to have the 
phrase '&lang=FR' in it.  well apparently &lang has a special meaning, as 
i can see from my request object that it has been encoded into an escape 
sequence against my will =)  

I have to manually set the action - to the exact same thing it is in the 
html - but this work around works.

    my $form = $agent->current_form;
    my $uri = URI->new("http://www.somesite.com/cgi-bin/app.w?city=FRA&lang=FR&currcode=EUR");
    $form->action($uri);
    $form->method("POST");

any ideas what code is 'helping me out' by escape-coding '&lang'?  and how 
do i turn it off?

-- 
gedanken


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About