Re: $bb->bucket_alloc();

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > So, based on your experience, should we advise users to use that > method just for convenience?. I trust your judgement over my own wrt giving user advice. I think the important thing is that users shouldn't start creating their own bucket alloca

Re: $bb->bucket_alloc();

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: [...] p.s. as it seems you've read a lot of the apache code, is it being used at all for that particular reason of not needing to pass bucket_alloc around but get it from the bb? Well it's used a lot in apr_brigade.c, because it makes se

Re: $bb->bucket_alloc();

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > p.s. as it seems you've read a lot of the apache code, is it being > used at all for that particular reason of not needing to pass > bucket_alloc around but get it from the bb? Well it's used a lot in apr_brigade.c, because it makes sense for apr-

Re: $bb->bucket_alloc();

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: [...] But back to my question, what if different pools were used to create different bucket allocations. Scenario: p_1 => ba_1 => b_1 => bb_1 p_2 => ba_2 => bb_2 now b_1 moves to bb_2, which is coming from a different pool. Don't we

Re: $bb->bucket_alloc();

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > But back to my question, what if different pools were used to create > different bucket allocations. Scenario: > > p_1 => ba_1 => b_1 > => bb_1 > p_2 => ba_2 => bb_2 > > now b_1 moves to bb_2, which is coming from a different pool. Don't we

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
David Wheeler wrote: On Oct 5, 2004, at 5:25 PM, Stas Bekman wrote: So David, I guess we will do the same for mp1 too? http://perl.apache.org/docs/1.0/api/Apache/Util.html Since when did I become the maintainer of mp1? ;-) I wasn't suggesting that you do that, just asking for your opinion, but if

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 5:25 PM, Stas Bekman wrote: So David, I guess we will do the same for mp1 too? http://perl.apache.org/docs/1.0/api/Apache/Util.html Since when did I become the maintainer of mp1? ;-) Yeah, I can document it, but it'd be nice to see it fixed, too. Regards, David --

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
David Wheeler wrote: On Oct 5, 2004, at 5:04 PM, Stas Bekman wrote: so, I'm +1 to forget all about an Apache::Util::escape_html in mp2 core. Works for me. So should I just adjust: http://perl.apache.org/docs/2.0/user/porting/ compat.html#C_Apache__Util__escape_html___ to say, use HTML::Entities

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 5:04 PM, Stas Bekman wrote: so, I'm +1 to forget all about an Apache::Util::escape_html in mp2 core. Works for me. So should I just adjust: http://perl.apache.org/docs/2.0/user/porting/ compat.html#C_Apache__Util__escape_html___ to say, use HTML::Entities instead? Yes, better

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Philippe M. Chiasson
Stas Bekman wrote: Geoffrey Young wrote: Of course we could just say: use HTML::Entities to do the work, but I believe it's slow(er?), as it's implemented in perl... I don't think it's our job to create a C implementation. perl people have HTML::Entities, which is excellent. if they want someth

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
Geoffrey Young wrote: Of course we could just say: use HTML::Entities to do the work, but I believe it's slow(er?), as it's implemented in perl... I don't think it's our job to create a C implementation. perl people have HTML::Entities, which is excellent. if they want something faster they can

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Geoffrey Young
> Of course we could just say: use HTML::Entities to do the work, but I > believe it's slow(er?), as it's implemented in perl... I don't think it's our job to create a C implementation. perl people have HTML::Entities, which is excellent. if they want something faster they can code it themselve

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
Philippe M. Chiasson wrote: [...] Alternatively we could just borrow ap_escape_html and rewrite it to not use the pool, but Perl's memory allocator. Or just use ap_escape_html but create/destroy a temporary pool for it to use ? -1, you will need to copy the string twice to move it into the Perl

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 4:28 PM, Stas Bekman wrote: Let's see first how do we resolve that for mod_perl 2. And once we do, remind us of this issue. Of course for mp1 you could use HTML::Entities, couldn't you? I do. Regards, David - T

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 4:25 PM, Stas Bekman wrote: So there is no CPAN lib that does that in C? Not that I know of. But keeping track of the flag should be dead simple. See the Encode sources. No, let me share them with you: SV * _utf8_on(sv) SV *sv CODE: { if (SvPOK(sv)) { SV *rsv =

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Philippe M. Chiasson
Stas Bekman wrote: David Wheeler wrote: On Oct 5, 2004, at 3:37 PM, Stas Bekman wrote: Of course we could just say: use HTML::Entities to do the work, but I believe it's slow(er?), as it's implemented in perl... It is slower, but it's also more correct, in that it doesn't turn of the utf8 flag

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
David Wheeler wrote: On Oct 5, 2004, at 4:15 PM, Philippe M. Chiasson wrote: How about resolving the issue by porting the my_escape_html() from mp1 to mp2 ? Any chance we could get this issue resolved while we're at it? http://www.mail-archive.com/dev%40perl.apache.org/msg08065.html Let's see fi

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
David Wheeler wrote: On Oct 5, 2004, at 3:37 PM, Stas Bekman wrote: Of course we could just say: use HTML::Entities to do the work, but I believe it's slow(er?), as it's implemented in perl... It is slower, but it's also more correct, in that it doesn't turn of the utf8 flag of the strings passe

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 4:15 PM, Philippe M. Chiasson wrote: How about resolving the issue by porting the my_escape_html() from mp1 to mp2 ? Any chance we could get this issue resolved while we're at it? http://www.mail-archive.com/dev%40perl.apache.org/msg08065.html Regards, David ---

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
Philippe M. Chiasson wrote: [...] though todo/features_missing suggests: * escape_html() - consider jeff baker's more robust implementation of my_escape_html(), which should probably be made in apache-2.0 itself (is there apache api? or just drop it) Anybody has an idea what code is being men

Re: $bb->bucket_alloc();

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: Joe, why do we expose $bb->bucket_alloc()? As I've explained before, the bucket_alloc slot doesn't belong to the brigade, it belongs to some pool. Exposing it is convenient, especially for APR-based libraries which don't care where t

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread David Wheeler
On Oct 5, 2004, at 3:37 PM, Stas Bekman wrote: Of course we could just say: use HTML::Entities to do the work, but I believe it's slow(er?), as it's implemented in perl... It is slower, but it's also more correct, in that it doesn't turn of the utf8 flag of the strings passed to it. Regards, Dav

Re: [mp2] missing Apache::Util::escape_html

2004-10-05 Thread Philippe M. Chiasson
Stas Bekman wrote: Marcus has just reminded me that Apache::Util::escape_html fell of our radars: http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Util__escape_html___ As the above URL suggests, Messiah is coming really soon now, or in other words, we were waiting for ap_escape_

Re: cvs commit: modperl-2.0 Changes

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: [...] Seriously, if we could abstract the magic you've added to the pool code to be more general purpose (sans adding overhead by generalization) it'd be nice to deploy it for $r, $c and may be other objects... The solution for pools do

Re: cvs commit: modperl-2.0 Changes

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > Seriously, if we could abstract the magic you've added to the pool > code to be more general purpose (sans adding overhead by > generalization) it'd be nice to deploy it for $r, $c and may be other > objects... The solution for pools doesn't trans

[mp2] missing Apache::Util::escape_html

2004-10-05 Thread Stas Bekman
Marcus has just reminded me that Apache::Util::escape_html fell of our radars: http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Util__escape_html___ As the above URL suggests, Messiah is coming really soon now, or in other words, we were waiting for ap_escape_html to be reworked

Re: [PATCH] Escape HTML in Apache::Status data and env dump

2004-10-05 Thread Stas Bekman
Markus Wichitill wrote: The fact that HTML in dumped variables in Apache::Status messes up the output has always bugged me, and this is also a potential XSS security issue, so here's a patch to escape the markup. Thanks Markus! Commmitted with minor tweaks. --

Re: cvs commit: modperl-2.0 Changes

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: [...] I like the idea of bb, but you will need to explicitly destroy it as well.. . Not sure I believe that... You mean all the calls to $bb->destroy are useless and even wrong?

Re: segfault in worker mpm

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: Joe Schaefer wrote: [...] mod_perl is trying to deparse the anonymous sub, and it needs B::Deparse for that. (I'm still trying to grok the necessity/safety of the deparse.) Right, that makes more sense. The necessity is explained in mo

Re: $bucket->setaside($pool);

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > So as we discussed I'll change the code to croak in the void context > and return the status otherwise. Cool- thanks Stas! -- Joe Schaefer - To unsubscribe, e-mail: [EMAIL PROTE

Re: $bucket->setaside($pool);

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: setaside API needs to be changed as it strays from the rest of the API. Since all it can return is errors which are useless to trap it shouldn't return anything. It should run M

Re: $bucket->setaside($pool);

2004-10-05 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: > Joe Schaefer wrote: > > Stas Bekman <[EMAIL PROTECTED]> writes: > > > >>setaside API needs to be changed as it strays from the rest of the > >>API. Since all it can return is errors which are useless to trap it > >>shouldn't return anything. It should run

Re: segfault in worker mpm

2004-10-05 Thread Stas Bekman
Philippe M. Chiasson wrote: It's probably the same, it tries to load B::Deparse. I've recently added a few tests which were exercising that feature (there was a bug earlier in it). See t/hooks/TestHooks/inlined_handlers.pm if you remove that test, the problem disappears? It definetely seems lik

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

2004-10-05 Thread Stas Bekman
[folks don't forget to crop the stuff you don't reply to. that reply had 2KB of new content and 30K of useless tail] Philippe M. Chiasson wrote: And just to be clear, you configured & build httpd in /home/mgorb/mp-test/httpd-2.0 or did you do that elsewhere and just installed httpd there (--pre

Re: $bucket->setaside($pool);

2004-10-05 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: setaside API needs to be changed as it strays from the rest of the API. Since all it can return is errors which are useless to trap it shouldn't return anything. It should run MP_RUN_CROAK like other methods do. It's still possible to tra

Re: segfault in worker mpm

2004-10-05 Thread Philippe M. Chiasson
Stas Bekman wrote: Joe Orton wrote: On Sun, Oct 03, 2004 at 07:21:12PM -0400, Stas Bekman wrote: modperl-2.0 'make test' running under worker mpm (linux) always fails in t/filter/both_str_req_add.t and dumps core: [...] I get the same trace as you then with worker. That's so much easier!!! Befor

Re: [PATCH] Apache__RequestUtil.h fix

2004-10-05 Thread Philippe M. Chiasson
Joe Orton wrote: New build break with older compilers, from a declaration after a statement: Bah! Thanks for the spot, usually I am the one reporting these problems on other people's code ;-) Fixed! --- xs/Apache/RequestUtil/Apache__RequestUtil.h 4 Oct 2004 19:27:37 - 1.26 +++ xs/Apache/Request

[PATCH] Escape HTML in Apache::Status data and env dump

2004-10-05 Thread Markus Wichitill
The fact that HTML in dumped variables in Apache::Status messes up the output has always bugged me, and this is also a potential XSS security issue, so here's a patch to escape the markup. Index: lib/Apache/Status.pm === RCS file: /

Re: [mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

2004-10-05 Thread Philippe M. Chiasson
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote on 29.09.2004 18:21:47: NetBSD-2.0_RC1 + perl-5.8.5 + httpd-2.0.52 : all the above builds and runs OK, but when trying to configure source of modperl-1.99_17-dev I get the following: $ perl Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0 Reading

[PATCH] Apache__RequestUtil.h fix

2004-10-05 Thread Joe Orton
New build break with older compilers, from a declaration after a statement: --- xs/Apache/RequestUtil/Apache__RequestUtil.h 4 Oct 2004 19:27:37 - 1.26 +++ xs/Apache/RequestUtil/Apache__RequestUtil.h 5 Oct 2004 10:32:34 - @@ -306,10 +306,12 @@ const char *retval = ap_document_roo

[mp2] NetBSD-2.0_RC1 httpd-2.0.52 modperl-1.99_17-dev configure error

2004-10-05 Thread MGorbunov
[EMAIL PROTECTED] wrote on 29.09.2004 18:21:47: > NetBSD-2.0_RC1 + perl-5.8.5 + httpd-2.0.52 : > > all the above builds and runs OK, but > > when trying to configure source of modperl-1.99_17-dev I get the > following: > > $ perl Makefile.PL MP_AP_PREFIX=$HOME/mp-test/httpd-2.0 > Reading Makef