On Fri, 13 May 2005, Igor Chudov wrote: > I was too quick to say that it worked. It does not > quite work with another PerlHandler of mine. > > I make a form, if I submit it with a GET method, it > works. If I submit it with a POST handler, CGI fails > to get parameters. I am most puzzled.
That is strange - there's a couple of tests in the mp2 distribution (under t/modules/) that test POST requests with CGI.pm. The handlers are simply: ====================================================== package TestModules::cgipost; use strict; use warnings FATAL => 'all'; use Apache2::compat (); use CGI (); use Apache2::Const -compile => 'OK'; sub handler { my $r = shift; $r->content_type('text/plain'); my $cgi = CGI->new; print join ":", map { $cgi->param($_) } $cgi->param; Apache2::Const::OK; } 1; __END__ SetHandler perl-script PerlOptions +GlobalRequest ========================================================= and ======================================================== package TestModules::cgipost2; # this handler doesn't use the :Apache layer, so CGI.pm needs to do # $r->read(...) instead of read(STDIN,...) use strict; use warnings FATAL => 'all'; use Apache2::compat (); use CGI (); use Apache2::Const -compile => 'OK'; sub handler { my $r = shift; $r->content_type('text/plain'); my $cgi = CGI->new($r); $r->print(join ":", map { $cgi->param($_) } $cgi->param); Apache2::Const::OK; } 1; __END__ ================================================================ Did these tests pass for you? Do these offer any clue as to why yours doesn't work? If not, can you send a minimal example of what doesn't work, along with the relevant configuration directives? -- best regards, randy