There could be something I'm missing here, but I believe you need to use
$r->content() to get POST arguments. Beware though, that once you call
content() you can't call it again, so hang onto whatever comes out of it.
Also...isn't it $r->args() or am I just completely missing something here?
You can always do the whole $r->method() eq 'GET' ? $r->args() :
$r->content(); dealy-bob too...
------------
Brian Nilsen
[EMAIL PROTECTED]
On Mon, 10 Sep 2001, Nathan Wiger wrote:
> Hey all-
>
> I'm beating my head against this issue, and I can't seem to figure it
> out. The problem is I have a <Location> block with a PerlHandler for a
> ticketing system app I'm writing:
>
> <Location /tickets>
> SetHandler perl-script
> PerlHandler Apache::TicketSystem
> </Location>
>
> I'm using Apache::Request to access the params with this simple code:
>
> sub handler {
> my $r = Apache::Request->new(shift());
> my %args = %{ $r->param };
>
> # more code ...
> }
>
> When I call the app with GET params, everything works fine. When I use
> POST, though, I don't get anything in %args. Reading the manpage for
> Apache::Request it looks like I should automatically get the params, ala
> CGI.pm. Oh yeah, and CGI.pm doesn't work either, so it doesn't seem to
> be an Apache::Request problem.
>
> Am I doing something wrong? Does <Location> not support POST params? All
> the packages are at the latest rev as far as I'm aware.
>
> perl 5.6.1
> apache 1.3.20
> mod_perl 1.25
> libapreq 0.33
>
> Thanks for any help.
>
> -Nate
>
> --
> Nathan Wiger
> Sysadmin and Perl Hacker
> Sun Microsystems
>