On Tue, 26 Oct 1999, Pouneh Mortazavi wrote:
> i'm so close to getting apache::ssi to work correctly.... but right now my
> work has come to a halt...
>
> I've tracked the problem down to POST-ed forms + SSI + virtual includes +
> $r->lookup_uri, but i don't know how to fix it!
>
> I use Apache::SSI to parse the contents of an HTML string and include any
> ssi variables, templates etc before printing to the screen.
>
> my modperl handler has a snippet of code like this:
>
> my $ssi = Apache::SSI->new($output_html, $r);
> $output_html = $ssi->output();
>
>
> the modperl handler is used to
>
> - display a login page
> - authenticate the user and display any error information
>
> I have a POST form for people to type in username,password and trigger
> off this handler. i'm noticing that if i use a POST request, the returned
> page just hangs forever, in the $r->lookup_uri stage of implementing a
> virtual include via SSI. If I use a GET request, $r->lookup_uri completes
> normally.
after the first time you read post data, you need the code below to
prevent somebody else from trying to read post data that's already been
read.
$r->method_number(M_GET);
$r->method('GET');
$r->headers_in->unset('Content-length');