Hi everyone!

I have a problem using mod_perl under Apache. I need to ensure that large files/requests are not allowed - so far as I know this is done using the Apache::Request object as follows:

Code:
my $r = Apache::Request->new(shift,
                             POST_MAX => 2 * 1024 * 1024, # in bytes, so 2M
                             DISABLE_UPLOADS => 0);

my $status = $r->parse();

# Return an error if we have problems.
return $status unless $status == OK;
But I don't create the Apache::Request object - indeed what I get in my handler method is an Apache::RequestRec object:

Code:
sub handler
{ my $r = shift;

  # $r is an Apache::RequestRec object
  my $content = $r->content;
  etc...
}
I am unsure how the two are related. But suffice to say I do not know how to set the POST_MAX value AFTER the object has been created - all examples I can find set it during the Apache::Request creation phase.

Anyone got any ideas?

Thanks
Jay