Hi, i had already tested the $r->read but it did not work, now i have found why.
$r->read(my $buffer, $len)
only works if $buffer is a string.
$r->read($ref->{buffer}, $len)
does not work, as $ref->{buffer} is empty. And that was what i was using, so i though a
long time ago it was some kind of windows-problem.
Using directly a string it works, thanks!



>eps com estem wrote:
>> 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.
><a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg%2Fdocs%2F2%2E0%2Fuser%2Fconfig%2Fconfig%2Ehtml%23C%5Fperl%5Fscript%5F"
target="_blank">http://perl.apache.org/docs/2.0/user/config/config.html#C_perl_script_</a>
>If you want to do it earlier, use the modperl API directly.
>   $r->read(my $buffer, $len)
><a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg%2Fdocs%2F2%2E0%2Fapi%2FApache%2FRequestIO%2Ehtml%23C%5Fread%5F"
target="_blank">http://perl.apache.org/docs/2.0/api/Apache/RequestIO.html#C_read_</a>
>> Apache/2.0.48 (Win32) mod_perl/1.99_13-dev Perl/v5.8
>--
>__________________________________________________________________
>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
><a href="/app/message?l=es&o=8&url=http%3A%2F%2Fstason%2Eorg%2F"
target="_blank">http://stason.org/</a>     mod_perl Guide ---> <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg"
target="_blank">http://perl.apache.org</a>
><a href="javascript:sendMsg('mailto:[EMAIL PROTECTED]');">mailto:[EMAIL 
>PROTECTED]</a> <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fuse%2Eperl%2Eorg"
target="_blank">http://use.perl.org</a> <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fapacheweek%2Ecom"
target="_blank">http://apacheweek.com</a>
><a href="/app/message?l=es&o=8&url=http%3A%2F%2Fmodperlbook%2Eorg"
target="_blank">http://modperlbook.org</a> <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fapache%2Eorg"
target="_blank">http://apache.org</a>   <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fticketmaster%2Ecom"
target="_blank">http://ticketmaster.com</a>
>--
>Report problems: <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg%2Fbugs%2F"
target="_blank">http://perl.apache.org/bugs/</a>
>Mail list info: <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg%2Fmaillist%2Fmodperl%2Ehtml"
target="_blank">http://perl.apache.org/maillist/modperl.html</a>
>List etiquette: <a
href="/app/message?l=es&o=8&url=http%3A%2F%2Fperl%2Eapache%2Eorg%2Fmaillist%2Femail%2Detiquette%2Ehtml"
target="_blank">http://perl.apache.org/maillist/email-etiquette.html</a>
---------------------------------------------------------

Descubre tu futuro para este verano: aventuras, amores, trabajo... Horóscopo en 
Ya.com: http://www.astrocentro.com/ya
Ya.com ADSL Router Wi-Fi: Sólo 29,90 €/mes + IVA*. Router + Antivirus y firewall 
ˇGratis! http://acceso.ya.com/adsl/256router

--
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

Reply via email to