Date: | Fri, 23 Dec 2005 14:01:24 +0200 |
From: | liran tal <liransgarage [...] gmail.com> |
To: | bug-HTTP-Recorder [...] rt.cpan.org |
Subject: | HTTP::Recorder can't go passed java as it seems |
Hey guys,
I'm using the cpan version - HTTP::Recorder 0.05 with the following code:
#!/usr/bin/perl
use HTTP::Proxy;
use HTTP::Recorder;
use URI::QueryParam;
# we're adding this to enable
login pages as according
# solutions at:
http://www.spanner.org/lists/osxperl/2005/08/22/905b481c.html
my $proxy = HTTP::Proxy->new();
# create a new HTTP::Recorder object
my $agent = new HTTP::Recorder;
# set the log file (optional)
$agent->file("/tmp/proxy");
# set HTTP::Recorder as the agent for the proxy
$proxy->agent( $agent );
# start the proxy
$proxy->start();
1;
when I try to login to a website which is (i assume) java enabled,
HTTP::Recorder stumbles upon some
errors or missing some libraries maybe.
Here's the output:
Use of uninitialized value in substitution (s///) at
/usr/local/share/perl/5.8.4/HTTP/Recorder/Logger.pm line 171.
Use of uninitialized value in concatenation (.) or string at
/usr/local/share/perl/5.8.4/HTTP/Recorder/Logger.pm line 173.
Can't locate object method "query_param" via package
"rec-action=submitform&rec-formname=p&rec-formnumber=1&rec-form1-unknown-userName=1&userName=colloron&rec-form1-password-password=1&password=t040682&rec-form1-unknown-language=1&language=&rec-form1-image-refresh=1&refresh.x=113&refresh.y=9"
(perhaps you forgot to load
"rec-action=submitform&rec-formname=p&rec-formnumber=1&rec-form1-unknown-userName=1&userName=colloron&rec-form1-password-password=1&password=t040682&rec-form1-unknown-language=1&language=&rec-form1-image-refresh=1&refresh.x=113&refresh.y=9"?)
at /usr/local/share/perl/5.8.4/HTTP/Recorder.pm line 347.
Use of uninitialized value in substitution (s///) at
/usr/local/share/perl/5.8.4/HTTP/Recorder/Logger.pm line 171.
Use of uninitialized value in concatenation (.) or string at
/usr/local/share/perl/5.8.4/HTTP/Recorder/Logger.pm line 173.
Can't locate object method "query_param" via package
"rec-action=submitform&rec-formname=p&rec-formnumber=1&rec-form1-unknown-userName=1&userName=colloron&rec-form1-password-password=1&password=t040682&rec-form1-unknown-language=1&language=&rec-form1-image-refresh=1&refresh.x=113&refresh.y=9"
(perhaps you forgot to load
"rec-action=submitform&rec-formname=p&rec-formnumber=1&rec-form1-unknown-userName=1&userName=colloron&rec-form1-password-password=1&password=t040682&rec-form1-unknown-language=1&language=&rec-form1-image-refresh=1&refresh.x=113&refresh.y=9"?)
at /usr/local/share/perl/5.8.4/HTTP/Recorder.pm line 347.
Use of uninitialized value in substitution (s///) at
/usr/local/share/perl/5.8.4/HTTP/Recorder/Logger.pm line 171.
While the appending to the log file seems just fine, but it won't go passed
it:
liran@octave:~/Programming/perls$ tail -f /tmp/proxy
$agent->get('http://www.example.net/');
$agent->get('http://www.example.net/index.html');
$agent->form_name('p');
$agent->field('password', '123123');
$agent->field('language', '');
$agent->field('userName', 'test');
$agent->click();
$agent->form_name('p');
$agent->field('password', '123123');
$agent->field('language', '');
$agent->field('userName', 'test');
$agent->click();
Any comment is welcome.
thanks.