On Wednesday 31 August 2011, Jim Jagielski wrote: > >> Looking at the patch in 2.2.x; there is a lot of effort expended > >> deadling with apr_bucket_split() returning ENOTIMPL - that looks > >> unnecessary; the filter will only handle brigades containing > >> buckets with known length, and all such buckets "must" be > >> _split-able. > > > > So you think we can rip out the whole if (rv == APR_ENOTIMPL) > > blocks? > > Belt and suspenders?
If we rip it out, we should replace it with ap_assert()s. And maybe only do it in 2.3? A different idea I had: If apr_bucket_split() returns ENOTIMPL, we could call apr_brigade_partition on the copied brigade. apr_brigade_partition() would then do all the complex handling of apr_bucket_read(), etc. It is only slightly less efficient because it has to traverse the brigade again. But the memory usage would still stay low because the original brigade would remain untouched. And we would get rid of much of the complexity in copy_brigade_range().
