--- Randy Kobes <[EMAIL PROTECTED]> wrote:
>
> my %args = $r->Apache::args;
> is for GET requests. For POST, as is described in
> the
> content() method of Apache::compat, for now one can
> use
>
> $r->setup_client_block;
> # return an error unless $r->should_client_block;
> my $len = $r->headers_in->get('content-length');
> my $buf;
> $r->get_client_block($buf, $len);
> my %args = map {
> s/%([0-9a-fA-F]{2})/pack("c", hex($1))/ge;
> $_;
> } split /[=&;]/, $buf, -1;
Just to help real newbies like me , we can also add
"+" substitution so that the above line becomes:
my %args = map {
s/%([0-9a-fA-F]{2})/pack("c", hex($1))/ge;
s/\+/ /g;
$_;
} split /[=&;]/, $buf, -1;
Thanks a lot, Randy.
Regards,
Sumitro Chowdhury.
>
> Some of the issues regarding, in particular, using
> the
> mod_perl-1-ish $r->args and $r->content in an array
> context
> are discussed at
>
>
http://perl.apache.org/docs/2.0/user/compat/compat.html
> But you do have a point that life will be easier
> when libapreq
> is ready :)
>
> --
> best regards,
> randy
>
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/