Rodent of Unusual Size <[EMAIL PROTECTED]> writes:

> In testing Apache, I want to hit boundary conditions,
> like sending a request with a Content-length larger
> than the actual body size.  I haven't tested it yet,
> but can I override the calculated size lwp will put
> into the header?

If you make the content into a sub then LWP will not override the
Content-Length value.

  $req = HTTP::Request->new(PUT => "http://....";);
  $req->content(wrap("hi there"));

  sub wrap {
     my $data = shift;
     return sub {
        my $tmp = $data;
        $data = "";
        return $data;


Reply via email to