gemoroy has asked for the wisdom of the Perl Monks concerning the following question:
Hi wise monks!
I encountered a strange problem with writing bucket bridge oriented filters
package MyApache2::InputRequestFilterLC; use strict; use warnings; use base qw(Apache2::Filter); use Apache2::Connection (); use APR::Brigade (); use APR::Bucket (); use Apache2::Const -compile => 'OK'; use APR::Const -compile => ':common'; sub handler : FilterRequestHandler { my ($f, $bb, $mode, $block, $readbytes) = @_; my $c = $f->c; my $bb_ctx = APR::Brigade->new($c->pool, $c->bucket_alloc); my $rv = $f->next->get_brigade($bb_ctx, $mode, $block, $readbyte +s); return $rv unless $rv == APR::Const::SUCCESS; while (!$bb_ctx->is_empty) { my $b = $bb_ctx->first; if ($b->is_eos) { $bb->insert_tail($b); last; } my $len = $b->read(my $data); $b = APR::Bucket->new($bb->bucket_alloc, lc $data) if $len; $b->remove; $bb->insert_tail($b); } return Apache2::Const::OK; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache 2.2 mod_ssl and bucket's
by trwww (Priest) on Feb 10, 2010 at 07:14 UTC |