Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread William A. Rowe, Jr.
It's a bug in mod_xslt, if that module trys to set aside a transient bucket. Bill At 12:09 AM 5/19/2004, Stas Bekman wrote: 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

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Stas Bekman
William A. Rowe, Jr. wrote: It's a bug in mod_xslt, if that module trys to set aside a transient bucket. Ah, cool, for some reason I thought that transient still has to have a copy :) Thanks Bill! At 12:09 AM 5/19/2004, Stas Bekman wrote: We have the following situation in mod_perl 2 land: we

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Nick Kew
On Tue, 18 May 2004, Stas Bekman wrote: 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. That seems to me an unnecessarily complex and inefficient XSLT

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Paul Querna
On Wed, 2004-05-19 at 07:38 +0100, Nick Kew wrote: We have at least one implementation that works like that (originally mine, but now more actively developed by others as mod_transform). Perhaps mod_perl users might benefit from switching? Currently it is only in a Subversion Repo:

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Stas Bekman
Nick Kew wrote: On Tue, 18 May 2004, Stas Bekman wrote: 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. That seems to me an unnecessarily complex and

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Nick Kew
On Tue, 18 May 2004, Stas Bekman wrote: Frankly I even have no idea who is the author of mod_xslt, it's not part of the mod_perl project. There are several modules with that name. When you raised it as a problem you had encountered with mod_perl, I thought maybe mod_perl had specific hooks

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Cliff Woolley
On Wed, 19 May 2004, William A. Rowe, Jr. wrote: It's a bug in mod_xslt, if that module trys to set aside a transient bucket. Huh? No it isn't. Half of the reason setaside() even exists is to handle transient buckets. static apr_status_t transient_bucket_setaside(apr_bucket *b, apr_pool_t

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Cliff Woolley
On Wed, 19 May 2004, Cliff Woolley wrote: Note: ap_save_brigade() handles the setaside and brigade concatenation for you. I suspect there are a number of places in the code that we are incorrectly calling APR_BRIGADE_CONCAT() instead of ap_save_brigade(). That's bug city right there. Worse,

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread William A. Rowe, Jr.
At 08:33 AM 5/19/2004, Cliff Woolley wrote: On Wed, 19 May 2004, William A. Rowe, Jr. wrote: It's a bug in mod_xslt, if that module trys to set aside a transient bucket. Huh? No it isn't. Half of the reason setaside() even exists is to handle transient buckets. I didn't say setaside(), and

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Cliff Woolley
On Wed, 19 May 2004, Cliff Woolley wrote: can't just ignore APR_ENOTIMPL for bucket types, because pipe and socket buckets never had setaside implemented on them. I thought I remembered that that was because Greg and Ryan and I had some huge debate about it and it was decided for some reason

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Stas Bekman
Cliff Woolley wrote: On Wed, 19 May 2004, Cliff Woolley wrote: can't just ignore APR_ENOTIMPL for bucket types, because pipe and socket buckets never had setaside implemented on them. I thought I remembered that that was because Greg and Ryan and I had some huge debate about it and it was

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Stas Bekman
Cliff Woolley wrote: On Wed, 19 May 2004, Stas Bekman wrote: And a lot of pain and wasted time could be saved if all this was documented. I know. :( I'm not aware of such documentation's existance, besides very scarce notes in the header files. The best documentation that exists, besides

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Cliff Woolley
On Wed, 19 May 2004, Stas Bekman wrote: And a lot of pain and wasted time could be saved if all this was documented. I know. :( I'm not aware of such documentation's existance, besides very scarce notes in the header files. The best documentation that exists, besides what's in the header

Re: is it possible to mark buckets to be copied only when to be set-aside?

2004-05-19 Thread Cliff Woolley
On Wed, 19 May 2004, Stas Bekman wrote: I'm sure Cliff and other filter gurus For the record, I make no claims as to being a filter guru. Some parts of the filtering system baffle me as much as anybody else. I know buckets. I more or less leave the filtering to somebody else. :) will be

is it possible to mark buckets to be copied only when to be set-aside?

2004-05-18 Thread Stas Bekman
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