works in RC4 + libapreq 2.04
use Apache::Request()
sub handler
{
my $r = shift;
my $apr = Apache::Request->new( $r , DISABLE_UPLOADS=>0, POST_MAX=>100000 );
$stringvalue = $apr->param($stringname);
}
RC5 is slightly different from the namespace stuff, and you need to run one of the svn branches of libapreq -- either trunk or multi-env -- its under active development right now
personally, i think libapreq is the best way to read GET/POST data under MP2
On Apr 23, 2005, at 3:56 PM, Michael Schout wrote:
I am wondering what the best way is to read POST data under MP2.
In MP1, I was using $r->content for this. In MP2, $r->content does not exist, so I used the version from an earlier copy of Apache::compat, which was using $r->get_client_block() instead.
Now, get_client_block() is apparently deprecated, and I am left with the
choice of:
1) using $r->read(). CGI.pm apparently does it this way. 2) Use APR::Brigade. Apache2::compat from 2.0.0 RC5 does provides content() this way. 3) some other way that I do not know about :).
I am unclear what the advantages are for either approach. The APR::Brigade docs do not really clarify this for me.
Does anyone know which of these methods is better and why?
Regards, Michael Schout