Re: CGI.pm not processing POST within AuthenHandler

2003-06-08 Thread Joe Schaefer
"Michael L. Artz" <[EMAIL PROTECTED]> writes:

> For some reason, CGI.pm (2.93) does not seem to parse POST data within a
> PerlAuthenHandler.  For example, the following:
> 
> sub handler {
> my $r = shift;
> my $q = new CGI($r);
> my @params = $q->param;
> $r->server->log->error("handler params are " . join "::", @params);
> return Apache::OK;
> }

[...]

> Apache/2.0.44 (Gentoo/Linux) mod_perl/1.99_09 Perl/v5.8.0 CGI.pm/2.93

Attempting to read POST data before the content-handler is called
is unsafe with httpd-2.  You'll probably have to wait for
Apache::Request to be ported over in order to do something like that.

-- 
Joe Schaefer



CGI.pm not processing POST within AuthenHandler

2003-06-08 Thread Michael L. Artz
For some reason, CGI.pm (2.93) does not seem to parse POST data within a 
PerlAuthenHandler.  For example, the following:

sub handler {
   my $r = shift;
   my $q = new CGI($r);
   my @params = $q->param;
   $r->server->log->error("handler params are " . join "::", @params);
   return Apache::OK;
}
logs the paramter names correctly if the request is a GET, but not if a 
POST.  The same code works fine within an Apache::Registry script, which 
I assume will have the same behavior as a PerlResponseHandler.  I also 
attempted both the x-www-form-urlencoded and multipart/form-data POST 
types and neither worked.

Am I missing something that mod_perl is not doing till the response 
phase, like setting up STDIN?  I thought that this might have had 
something to do with an earlier thread 
(http://marc.theaimsgroup.com/?t=10499295465&r=1&w=2), however I 
also tried adding:

$r->subprocess_env;
Apache->request($r);
to the handler to no avail.

Thanks
-Mike
Apache/2.0.44 (Gentoo/Linux) mod_perl/1.99_09 Perl/v5.8.0 CGI.pm/2.93


 
   AllowOverride None
   Options +ExecCGI
   SetHandler perl-script
   PerlAuthenHandler Apache::MyAuth::handler
   AuthType Cookie
   AuthName MyPrivateStuff
   require valid-user
   PerlResponseHandler ModPerl::Registry