Filter sequence and runtime filter manipulation for non-mod_perl filters

2014-11-09 Thread dorian taylor
? (Note: I was hoping to be able to cargo-cult up a re-ordered sequence with mod_filter, but that got me nowhere. Actually, it got me a segfault.) Thanks, -- Dorian Taylor http://doriantaylor.com/

Re: Filter sequence and runtime filter manipulation for non-mod_perl filters

2014-11-09 Thread dorian taylor
Correction: add_output_filter is in Apache2::Filter but is a member of $r (or $c). So I'd make a small FixupHandler, not another mod_perl filter. -- Dorian Taylor http://doriantaylor.com/

ap_save_brigade

2013-07-22 Thread dorian taylor
—and apparently written a patch.) Cheers, -- Dorian Taylor http://doriantaylor.com/

Re: ap_save_brigade

2013-07-22 Thread dorian taylor
in mod_perl in a way that stipulates passing a target brigade in as input though. I'm pretty sure it'd be a heck of a lot more efficient than that subroutine I just wrote above. On Mon, Jul 22, 2013 at 12:14 AM, dorian taylor dorian.taylor.li...@gmail.com wrote: Hello, Is there a reason why

Transfer-Encoding: chunked in requests

2010-10-04 Thread Dorian Taylor (Lists)
this. For reference, I am using: Apache/2.2.11 (Ubuntu) DAV/2 SVN/1.5.4 mod_perl/2.0.4 Perl/v5.10.0 Thanks, -- Dorian Taylor Make things. Make sense. http://doriantaylor.com

debian testing vs mod_perl trunk: Makefile.PL, IO and XSLoader

2005-08-02 Thread Dorian Taylor
the most bizarre thing popped up when i was trying to build a mod_perl deb (and from regular source) on debian testing/i386: String found where operator expected at /usr/lib/perl/5.8/IO.pm line 11, near XSLoader::load 'IO' (Do you need to predeclare XSLoader::load?) syntax error at

Re: debian testing vs mod_perl trunk: Makefile.PL, IO and XSLoader

2005-08-02 Thread Dorian Taylor
Assuming you're aware of the renaming issue: http://perl.apache.org/docs/2.0/rename.html I've seen a similar error when installing a current CPAN/svn mod_perl-2 over top of an existing mod_perl-2 that followed the old API. Did you remove any old mod_perl-2 installation before installing

Apache::Test assumes Test::Builder 0.29

2005-07-14 Thread Dorian Taylor
apparently the reset() method of Test::Builder = 0.29_01 has been turned into an instance-only method, thus any call to Apache::Test::test_pm_refresh() when using Apache::Test qw(-withtestmore) will cause test code to die. perhaps schwern should be notified as well? .d

Re: Apache::Test assumes Test::Builder 0.29

2005-07-14 Thread Dorian Taylor
this is fixed in svn hm weird i thought i updated before i checked again. why? I think that at best I was mis-using the call to reset() - it always accepted $self as an argument, but since it wasn't actually being used I ignored it, mostly because I didn't want to mess around with getting

Re: Switch and mod_perl

2005-06-23 Thread Dorian Taylor
On Thu, Jun 23, 2005 at 03:19:22PM -0400, Perrin Harkins wrote: On Thu, 2005-06-23 at 10:46 +0200, Jan Eden wrote: could it be that mod_perl doesn't play nice with the Switch module? Isn't it a source filter? Those don't work with mod_perl. You probably shouldn't use Switch for anything

Re: Apache2::Upload Issue

2005-06-20 Thread Dorian Taylor
uh, hate to bring up a no-brainer, but just out of curiosity, is the Content-length request header accurate for the encoded payload *after* it's encoded? just on the off chance that libapreq2 is stricter than libapreq1, an error like end of file reached would occur if there was extraneous data

[ANNOUNCE] Apache(2)::DebugLog, Apache(2)::LogF

2005-06-12 Thread Dorian Taylor
i've just completed a couple logging convenience modules. the first: http://search.cpan.org/~dorian/Apache-DebugLog-0.01/ allows for two dimensional (i.e. category, verbosity) debug logging on top of the normal debug log. the second: http://search.cpan.org/~dorian/Apache-LogF-0.01/ simply adds

Re: Any way for a PerlHandler to know what Location block it's in?

2005-06-08 Thread Dorian Taylor
On Wed, Jun 08, 2005 at 12:00:23PM -0400, John Siracusa wrote: On 6/8/05, Geoffrey Young [EMAIL PROTECTED] wrote: $r-location() ? Duh, I'm an idiot. Thanks :) -John $r-location will also return whatever's in a LocationMatch, Directory and DirectoryMatch directive, should the scope of

[ANNOUNCE] Apache2::TrapSubRequest 0.03

2005-06-08 Thread Dorian Taylor
http://search.cpan.org/~dorian/ - now with working tests. 0.03 should show up soon (forgot to remove the bit about ap_save_brigade in 0.02)

Re: [ANNOUNCE] Apache2::TrapSubRequest 0.03

2005-06-08 Thread Dorian Taylor
Hmm, have you considered removing the _filter sub and writing it as a closure instead? Here's some code that I've been using for that: i suppose i could do that. today is clean-my-modules-and-get-them-on-cpan day so perhaps later. ;) .d

testing against both apache 1.x and 2.x

2005-06-08 Thread Dorian Taylor
so i'm working on one of my modules that works in both mod_perl 1 and 2, (custom config directives, conditional makefile processing, the whole nine) and i realized i have to test against both apache 1 and 2, preferably in one sequence. now, there's APACHE_TEST_APXS, APACHE_TEST_HTTPD and whatnot,

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Dorian Taylor
http://search.cpan.org/dist/Apache-TrapSubRequest/lib/Apache/TrapSubRequest.pm this is actually broken. it needs the ap_save_brigade patch. i'm in a c mood so i think i'll hook up an xs version tonight. thanks for reminding me. .dorian

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Dorian Taylor
Or rewrite it to stash data from $bb-flatten, instead of stashing brigades. In which case, no extra API is needed. this is true. i'll put something up on cpan tonight. .dorian

[mp2] OR_EXEC_ON_READ

2005-05-21 Thread Dorian Taylor
did this go away? i can't find any mention of it in the source other than the documentation and core module logic. i'm currently playing with making a container configuration, and the documentation says to set OR_EXEC_ON_READ on the req_override, but it doesn't appear to be present in

[mp2] enforcing the order of mod_perl with other modules

2005-05-18 Thread Dorian Taylor
i was under the impression that for each phase in the request, modules were hooked in the order they were loaded. has this behavior changed? is there any way to force mod_rewrite, for example, to operate before mod_perl in the transhandler phase? cheers .dorian

Re: [mp2] enforcing the order of mod_perl with other modules

2005-05-18 Thread Dorian Taylor
in apache 1.3 yes, just change the order of the modules with LoadModule or ClearModuleList+AddModule. in 2.0 you need to alter the mod_rewrite or mod_perl sources, unfortunately. yeah i just looked at that. what happend to Apache2::Hook? .dorian

Re: [mp2] [PATCH] implement ap_save_brigade

2005-05-17 Thread Dorian Taylor
I'm not getting very far with this, Dorian. Neither httpd-dev nor apr-dev are taking it anywhere. So at the moment ap_save_brigade is sort of an unstable API, so other developers think we shouldn't expose it in the core API. So at the moment you have two options: hm, this is unfortunate.

source scanning process seems to miss APR::Const::SUCCESS (and others)

2005-05-09 Thread Dorian Taylor
Using Debian testing with the packaged versions of Apache 2.0.54-prefork and APR 0.9.6, I ran make source_scan on the -current (rc6) tarball. It seems that only the constant groups fopen, fprot and filetype were found. I can only presume after looking at Apache2::ParseSource, that the required apr

[mp2] [PATCH] implement ap_save_brigade

2005-05-09 Thread Dorian Taylor
no tests currently, but there's a module on cpan that uses it. http://search.cpan.org/~DORIAN/Apache-TrapSubRequest-0.01/ diff -ur mod_perl-2.0.0-RC4/lib/Apache/ParseSource.pm mod_perl-2.0.0-RC4-djt/lib/Apache/ParseSource.pm --- mod_perl-2.0.0-RC4/lib/Apache/ParseSource.pmFri Jan 7

source scanning process seems to miss APR::Const::SUCCESS (and others)

2005-05-09 Thread Dorian Taylor
Using Debian testing with the packaged versions of Apache 2.0.54-prefork and APR 0.9.6, I ran make source_scan on the -current (rc6) tarball. It seems that only the constant groups fopen, fprot and filetype were found. I can only presume after looking at Apache2::ParseSource, that the required apr

Re: [mp2] [PATCH] implement ap_save_brigade

2005-05-09 Thread Dorian Taylor
How is that related? i think that's some cargo culting that i didn't clean up. that can be disregarded. So you think this approach will be faster than flattening bb on each filter invocation and concatenating the scalar? honestly i didn't give it any thought. when i wrote this i just wanted

Re: [mp2] [PATCH] implement ap_save_brigade

2005-05-09 Thread Dorian Taylor
it'd be nice to run a benchmark. I wonder why ap_save_brigade was marked as ! in the map file. Which normally means it's not going to be exposed. Did you by chance look at the archives for possible references to it? there's a mention of it in the APR::Bucket manpage. i couldn't find anything

[mp2] erratum: ap_bucket_save should be ap_save_brigade

2005-02-10 Thread Dorian Taylor
same issue, now with a function that exists. ;)

[mp2] apache 2.0.53 and ap_bucket_save

2005-02-09 Thread Dorian Taylor
i've been reading apache list archives and source changelogs regarding a bug recently fixed in ap_bucket_save. i noticed that it was marked with a ! in xs/maps/apache_functions.map. was it unimplemented due to this bug or are there other implications to enabling this functionality? cheers

Re: [mp2] reliable methods to prevent handlers from repeating

2005-01-24 Thread Dorian Taylor
here's my solution to handler loop prevention when the initial request to a handler isn't necessarily the main request: sub handler { my $r = shift; my $mr = $r-main || $r; if ($mr-notes-get(__PACKAGE__ . '::SEEN')) { $r-log-debug(We are looping.); return

Re: [mp2] reliable methods to prevent handlers from repeating

2005-01-20 Thread Dorian Taylor
instead of looping around try $r-main-notes or $r-prev-notes hm, that loop should eventually hit all requests in the chain though, no? also, the first hit to that handler could in fact be a subrequest, so $r-main-notes may never be set. i do admit i'm cargo culting a little bit by looping over

Re: [mp2] reliable methods to prevent handlers from repeating

2005-01-20 Thread Dorian Taylor
On Thu, Jan 20, 2005 at 02:32:59PM -0800, Philippe M. Chiasson wrote: Dorian Taylor wrote: suppose i wanted the same logic as: return Apache::DECLINED unless $r-is_initial_req; except that sometimes it may be necessary to serve for a subrequest, just not more than once. the construct

[mp2] memory access violation in $subr-run

2005-01-12 Thread Dorian Taylor
i'm running into a problem with the execution of subrequests. the process dies in modperl_wbucket_flush. this problem occurs with the same perl code in prefork.c and worker.c on osx. note, the subrequest is run from a non-response handler (i've tried header-parser through fixup, same effect). the

Re: mod_perl, SVN::Core-related segfault condition

2004-11-24 Thread Dorian Taylor
On Tue, Nov 23, 2004 at 10:08:49PM +, Dorian Taylor wrote: But I don't see the problem that you describe. hm, i guess that makes the problem either a mac thing, an apr thing or an apache thing. apparently it's httpd-2.1. damnit. that means now i have to backport mod_dav_lock. oh well

Re: mod_perl, SVN::Core-related segfault condition

2004-11-23 Thread Dorian Taylor
oops, sorry, was in the wrong mutt window. what exactly is required from mod_perl in the preflight config stage? does it basically just `use' every preloaded module in the conf to see if it can? I'm not sure what do you ask. I meant apr design problem, not modperl's one. mod_perl does not

Re: mod_perl, SVN::Core-related segfault condition

2004-11-23 Thread Dorian Taylor
argh, spacy today. *here* is the file. APR-CrashMe-0.01.tar.gz Description: application/tar-gz -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html

[mp2] recirculating (sub)?request output

2004-08-26 Thread Dorian Taylor
suppose i wanted to run a subrequest, but instead of outputting the body (or headers, or anything) of that request down the wire, i wanted to snag it for processing in another handler. i tried writing a filter that gathered the content and stuck it in $f-r-prev-notes, but it still flushes the

libapreq and filters

2004-08-12 Thread dorian taylor
suppose i wanted to significantly alter the structure of a POST request via Apache::Request, but i wanted to re-inject the request body back into the input bucket brigade to be processed by a later module? i'm thinking something like this: POST from client Apache::Request-based handler

[mp2] PerlModule vs PerlLoadModule

2004-07-20 Thread dorian taylor
if PerlLoadModule supplants the command table, i surmise it does the job of PerlModule as well (which i understand to be roughly the equivalent of 'use'). i'm wondering, would there ever be a reason to load a module without wanting to supplant the command table with any existing values that may be

Re: [mp2] access to merged external (non-perl) config directives

2004-07-14 Thread dorian taylor
I know you can do: $r-location_merge('container_string'); which forces an earlier merge, but I'm not sure it'll affect the conf tree shown by Apache::Directive. Have you tried looking at the C code to see whether there is a C API for that? well, there's $r-per_dir_config and