Stas Bekman
Sun, 08 Jun 2003 21:50:49 -0700
ap_http_filter seems to assume it will receive an empty brigade from its caller. The problem is around lines 1028 - 1035 in http_protocol.c:
rv = ap_get_brigade(f->next, b, mode, block, readbytes);
if (rv != APR_SUCCESS) { return rv; }
/* How many bytes did we just read? */ apr_brigade_length(b, 0, &totalread);
totalread is only accurate in this context if b was empty to begin with. Is this is a bug in ap_http_filter?
# fetch and consume bucket brigades untill we have at least SIZE
# bytes to work with
do {
my $tbb = APR::Brigade->new($filter->r->pool, $ba);
my $rv = $filter->next->get_brigade($tbb, $mode, $block, $readbytes);
($data, $seen_eos) = flatten_bb($tbb);
$tbb->destroy;
$buffer .= $data;
} while (!$seen_eos && length($buffer) < SIZE);__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com