Stas Bekman <[EMAIL PROTECTED]> writes:

> Now going to try and reduce that sequence to a shorter one...

I don't think you need bother- the brigade loop is 
miscoded in compat.pm's content sub-  you can't 
ask for the next bucket *after* $b has been removed.

Instead of iterating using for(;;), use while():

  while ($b = $bb->first) {
      ++$seen_eos, last if $b->is_eos;
      if ($b->read(my $buf)) {
          $data .= $buf;
      }
      $b->delete; # APR::Bucket needs to wrap apr_bucket_delete(), 
                  # since APR_BUCKET_REMOVE() doesn't actually
                  # decrement the bucket refcount
                  # so the bucket allocator can reclaim $b
  }

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to