We have the following situation in mod_perl 2 land: we use the same buffer to
allocate data in buckets which are passed to the filters. That bucket is
created once per request. It works perfectly fine and effective most of the
time (we copy from user's program perl space into the re-usable buffer, but no
extra allocation happens). But just now one user has reported that it breaks
mod_xslt filter, which sets aside the buckets sent from the modperl handler,
and then uses them after seeing EOS. By that time the data in all but last
bucket is corrupted. Obviously the straightforward solution is to allocate a
new buffer for each bucket that mod_perl sends to the filter chain. But this
is a huge waste for most users, which don't use this particular kind of output
filters that setaside buckets.
My question is: Is it possible to mark the bucket's data as volatile or
something, so if a downstream filter wants to set them aside it will have to
do the copying?
At the moment the bucket is created as:
bucket = apr_bucket_transient_create(buf, len, ba);
and buf is static for the length of the request.
Thank you.
--
__________________________________________________________________
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