perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "akioi"<ak...@bol.com.br>
Subject RE: Help about $r->content( )
Date Fri, 03 Mar 2000 20:03:18 GMT
Ok!

It worked fine.

Thanks

> On Wed, 1 Mar 2000, Alex wrote:
> > Yes, here it is :
> 
> your code works fine for me
>  
> > When I submit the form I get the following alert message, after 
timeout:
> > 'The server returned an invalid or unrecognized response' 
> > 
> > Note that I have a page with a form that activates this simple 
module and I have one directive 
> > ErrorDocument 306 /error.htm in httpd.conf, another observation 
is that when I change the 
> > method in the form from POST to GET using $r->args inside the 
module, it works. But I need to 
> > do that using POST. Another thing, when I don´t call 
$r->content() it works too!
> 
> somebody else is probably trying to read the POST data, after you 
already
> have.  try changing you test to something like this:
> 
> use Apache::Constants qw(M_GET);
> 
> sub My::Test::handler {
>     my $r = shift;
> 
>     if ($r->method eq 'POST') { 
>        my $content = $r->content;
>        # ...
>        #make sure nobody else tries to read POST data now that 
we have
>        $r->method('GET');
>        $r->method_number(M_GET);
>        $r->headers_in->unset('Content-length');
>     }
> 
>     return 306;
> }
> 
> 


______________________________________________
Coloque o BOL entre os Top 3 do iBest!
É só até terça - Vote já
http://www.bol.com.br/ibest.html 
 


Mime
View raw message