Set a wrong Content-Length with LWP

[email protected] ("Octavian Rasnita")
Newsgroups perl.libwww
Message-ID <037001d4b8a5$b914cdd0$6500a8c0@OctavianTOSH>
Hi all,

Does anyone know if it is possible to set a wrong Content-Length with LWP?
Or if not, then how can we do it?

The following corrects it and sets it to "Content-length: 5":
$ua->post( $url, 'Content-Length' => 3, Content => '12345' );

The following also does the same, plus it shows a warning telling that Content-Length was corrected:
my $req = HTTP::Request->new( POST => $url );
$req->header( 'Content-Length' => 3 );
$req->content("12345");

I need to send a Content-Length that has a different value than the length of the posted content.

Thank you.

--Octavian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.