On Sun, Sep 30, 2001 at 04:03:43PM -0700, Alin Simionoiu wrote:
> I tried instance, but is not working is you want to access let's say,
> POST data in a authentication handler, doing same data validation or
> whatever you want to do, and also access the same POST data at response
> phase.
> 
> And this is because, as it is explained in guide, POST data are
> retrieved directly from the socket.So once you read that, is gone.
> 
> The only way to keep this around that I know about is to internally
> transform POST in a GET.

And then the method that Apache::Requets->instance uses.

actual code:
sub instance {
    my $class = shift;
    my $r = shift;
    if (my $apreq = $r->pnotes('apreq')) {
        return $apreq;
    }
    my $new_req = $class->new($r, @_);
    $r->pnotes('apreq', $new_req);
    return $new_req;
}

Which means you're only calling Apache::Request->new once and therefore
only reading from the socket once. This is stored in the pnotes table
in the Apache request object and follows all the way through the request
and will make POST's work from both your AuthenHandler and your content
handler in the same request.

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer> 

Reply via email to