Can someone help me resolve this error. I have a short script that is connecting to a web site and submitting a form. I am getting an "411 Length required" message back. Here is the code I have in place. Any ideas how I can get around this?
Thanks In advance.
Phil
#!usr/bin/perl
use strict;
use warnings;
use LWP;
my $browser = LWP::UserAgent->new;
$browser->agent("Mozilla/4.76 [en] (Windows NT 5.0; U)");
$browser->proxy('http', '
my $response = $browser->post(
' 'cPageId' => '7920',
,
);
die "Hmm, eror \"", $response->status_line( ), "\" when getting " unless $response->is_success( );
my $content_type = $response->content_type( );
die "Hm, unexpected content type $content_type from "
unless $content_type eq 'text/html';
my $content = $response->content( );
die "Odd, the content from is awefully short!"
if length($content) < 3000;
print "\n";
print $content;
print "\n";
print $response->status_line();
print "\n";
Thanks In advance.
Phil
#!usr/bin/perl
use strict;
use warnings;
use LWP;
my $browser = LWP::UserAgent->new;
$browser->agent("Mozilla/4.76 [en] (Windows NT 5.0; U)");
$browser->proxy('http', '
my $response = $browser->post(
' 'cPageId' => '7920',
,
);
die "Hmm, eror \"", $response->status_line( ), "\" when getting " unless $response->is_success( );
my $content_type = $response->content_type( );
die "Hm, unexpected content type $content_type from "
unless $content_type eq 'text/html';
my $content = $response->content( );
die "Odd, the content from is awefully short!"
if length($content) < 3000;
print "\n";
print $content;
print "\n";
print $response->status_line();
print "\n";