Hi.
I used to read POST data with the sentence read (STDIN,$var,$r_headers->{'Content-length'}); When the handler was invoked after submitting the formulary.
But, lately i changed the handler configured in apache.conf by a parsing URI module. There i catch the direction of the form submit and from there i call the handler. So the call is in a different phase (a previous phase), and then the same order read (STDIN,$var,$r_headers->{'Content-length'}); hangs the server. (The phase is PerlTransHandler +Blogum::BlogumURI)
I have guessed that at that phase the STDIN is still not closed (?) and that's why the server waits forever. ($r_headers->{'Content-length'} has already the num of content-length).
So my question is, can i read the POST data at PerlTransHandler stage? If yes, then i am doing something wrong, if not, there is some workaround or i will have to go back to my original handlers?
You can, but not the way you did. When you use 'SetHandler perl-script' STDIN gets tied to the request data only during the response phase.
http://perl.apache.org/docs/2.0/user/config/config.html#C_perl_script_
If you want to do it earlier, use the modperl API directly.
$r->read(my $buffer, $len)
http://perl.apache.org/docs/2.0/api/Apache/RequestIO.html#C_read_
Apache/2.0.48 (Win32) mod_perl/1.99_13-dev Perl/v5.8
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html