[HTTP-Recorder] HTTP::Recorder can't go passed java as it seems

liran tal liransgarage at gmail.com
Fri Dec 23 07:05:31 EST 2005


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 at octave:~/Programming/perls$ tail -f /tmp/proxy

$agent->get('http://www.example.net/') <http://www.example.net/%27%29>;

$agent->get('http://www.example.net/index.html')<http://www.example.net/index.html%27%29>
;
$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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/http-recorder/attachments/20051223/68b0358d/attachment.htm


More information about the HTTP-Recorder mailing list