Srebrenko Sehic wrote:
On 6/5/06, Philip M. Gollucci <[EMAIL PROTECTED]> wrote:

> I've defined a PerlAccessHandler which needs access to POST body. I've
> implemented a sub read_post {} which uses bucket brigades API to read
> the body (taken from mod_perl2 docs) and returns the data. However,
> the POST body is gone after I read it.
sub read_post_body {
     my $r = shift;

     my $bb = APR::Brigade->new($r->pool, $r->connection->bucket_alloc);
       $r->input_filters->get_brigade(
        $bb,
        Apache2::Const::MODE_READBYTES,
        APR::Const::NONBLOCK_READ,
        IOBUFSIZE

      );

      $len = $bb->flatten(my $buffer);

      $buffer;
}

Well of course the data is gone if you remove the buckets from the bigrade and destroy it.

--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Reply via email to