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/

Filter sequence and runtime filter manipulation for non-mod_perl filters

2014-11-09 Thread dorian taylor
er patch. Any insights? Am I undertaking unnecessary yak-shaving? (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: ap_save_brigade

2013-07-22 Thread dorian taylor
's really no reason why it couldn't be implemented 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

ap_save_brigade

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

Transfer-Encoding: chunked in requests

2010-10-04 Thread Dorian Taylor (Lists)
$chunk instead of appending to it (originally I had it as $buf). So I'm interested if there is a more appropriate way to do 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

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 instal

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

2005-08-02 Thread Dorian Taylor
mpilation aborted at Makefile.PL line 36. now, if i go disambiguate XSLoader::load with parentheses, it complains of an undefined subroutine. i'm not sure what's eating XSLoader's symbols, but it's sure messing me up. has anything around this sphere been changed recently, say, in the last couple weeks? .dorian

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 gettin

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: 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 any

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 af

EXEC_ON_READ configuration block directives

2005-06-18 Thread Dorian Taylor
is there a working example of a block directive implementation available? i just tried setting one up the way http://perl.apache.org/docs/2.0/user/config/custom.html#C_Apache2__Const__RAW_ARGS_ says, and i'm not appearing to get my config subroutine run. the config parser doesn't complain about th

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

2005-06-13 Thread Dorian Taylor
> sounds nice :) thanks ;) > if you succeed, is there any chance you could make the logic you came up > with generic enough to release it as a separate package? it would be really > nice to be able to use something like this from Makefile.PL see below... > > use Apache::ExtUtils::SomeName;

[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

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, b

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

[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: 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 s

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

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

[mp2] OR_EXEC_ON_READ

2005-05-21 Thread Dorian Taylor
sent in Apache2::Const. bizarre. .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

[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

[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] [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

Re: [mp2] [PATCH] implement ap_save_brigade

2005-05-09 Thread Dorian Taylor
PROPFIND responses into xslt processors. .dorian

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 want

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

2005-05-09 Thread Dorian Taylor
x27;m currently running a make test (which seems to pass minus content_length_header.t, but that's another issue). .dorian

[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

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

2005-05-09 Thread Dorian Taylor
x27;m currently running a make test (which seems to pass minus content_length_header.t, but that's another issue). .dorian

[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
heers .dorian

[mp2] retrieving the calling handler

2005-01-31 Thread Dorian Taylor
how would i go about retrieving (mod_perl or otherwise) the name of the immediate calling handler of the current handler being executed? i'm trying to do loop checking in which a given handler may need to be executed as a result of multiple subrequests, but never back to back. e.g.: # httpd.conf

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

2005-01-24 Thread Dorian Taylor
("We are looping."); return Apache::DECLINED; } $mr->notes->set(__PACKAGE__ . '::SEEN', 1); # ... do stuff, including other lookup_uri/lookup_file requests. $mr->notes->unset(__PACKAGE__ . '::SEEN'); return Apache::OK; # or whatever other status } comments? .dorian

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

2005-01-21 Thread Dorian Taylor
aha. $r->lookup_uri doesn't set the calling request object into $subr->prev, according to the apache source. i can't see any way to refer to the calling request from a subrequest, unless the calling request is the main request. how frustrating. .d

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 su

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

2005-01-20 Thread Dorian Taylor
On Thu, Jan 20, 2005 at 05:00:32PM -0500, Geoffrey Young wrote: > > > what technique would you use if you had to have a handler work > > exactly once, even though it may never be invoked as an initial > > request? > > if you're in prefork, off the top of my head I might set a perl global and > th

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 loopin

[mp2] reliable methods to prevent handlers from repeating

2005-01-20 Thread Dorian Taylor
otes->get(__PACKAGE__ . '::SEEN')) { $r->log->debug("We've been seen already."); return Apache::DECLINED; } } $r->notes->set(__PACKAGE__ . '::SEEN', 1); but i get no love. what's the preferred way of dealing with this? cheers .dorian

[mp2] fun with $r->location

2005-01-12 Thread Dorian Taylor
/bar/bitz yields the same results as GET /foo/bar. how would i reliably get MyApache::NopHandler to only ever emit "/foo"? cheers .dorian

[mp2] memory access violation in $subr->run

2005-01-12 Thread Dorian Taylor
fect). the crash will not occur if the handler is invoked as a response handler. if subrequests aren't meant to be run from non-response handlers, i suggest trapping and throwing an error. .dorian

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 b

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

2004-11-23 Thread Dorian Taylor
> 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. > Though I've httpd-2.0 and apr-0. Does this distro crash for you? i'm rolling back now. i have httpd-2.1 for mod_dav_lock (i tried just grabbing that separat

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

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 d

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

2004-11-23 Thread Dorian Taylor
> getting things to work. I first spent hours trying to get the mandrake > cooker binaries to work, but eventually I've built everything from source. yeah i went that way installing it all on my mac. i typically find i end up needing the source for reference if nothing else at one point or anothe

mod_perl, SVN::Core-related segfault condition

2004-11-22 Thread Dorian Taylor
(pool=0x18bc818) at memory/unix/apr_pools.c:714 #7 0x003a55c0 in apr_pool_clear (pool=0x1806218) at memory/unix/apr_pools.c:673 #8 0x0002870c in main (argc=3, argv=0xbe88) at main.c:653 cheers .dorian -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/m

[mp2] recirculating (sub)?request output

2004-08-26 Thread Dorian Taylor
ushes the headers of the main request. what would be the most appropriate way to go about doing this kind of thing? cheers dorian -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maill

libapreq and filters

2004-08-12 Thread dorian taylor
akes document to be PUT and PUTs it somewhere is this kind of thing possible in any way? .dorian -- 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

Re: [mp2] PerlModule vs PerlLoadModule

2004-07-21 Thread dorian
> The two are not the same, as explained here: > http://perl.apache.org/docs/2.0/user/config/custom.html#Enabling_the_New_Configuration_Directives > > "This [PerlLoadModule] directive is similar to PerlModule, but it > require()'s the Perl module immediately, causing an early mod_perl startup."

[mp2] PerlModule vs PerlLoadModule

2004-07-20 Thread dorian taylor
ues that may be present? would it make sense at all to effectively disambiguate the two directives by making them both synonyms for PerlLoadModule? cheers .dorian -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://

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

2004-07-14 Thread dorian taylor
rned from $r->(per_dir|request)_config. although, that seems like more of a "write" than a "read" method. what i'm after is the result of the merge without actually permanently modifying anything. will look at httpd source i guess, and the mod_perl 2 source again

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

2004-07-13 Thread dorian
r possible VirtualHost, Location, Directory and .htaccess have been merged? i tried Apache::Directive, but that seems to more or less just give me the conf as it was written. cheers .dorian -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List

APR::Brigade::destroy (re: talk @sophos)

2004-07-11 Thread dorian
patch, let me know. cheers .dorian -- 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

Re: Behaviour of Apache::DBI for other applications

2004-04-14 Thread dorian
> yes. from DBI.pm: ah, sneaky. this seems to work: package XMLTest; use strict; use warnings; use XML::LibXML; our $XML; *_new = \&XML::LibXML::new; *XML::LibXML::new = \&new; sub new { return $XML ||= _new(@_); } 1; __END__ minus a bit of whining about the sub redefinition, of cour

Behaviour of Apache::DBI for other applications

2004-04-14 Thread dorian
I'm interested in implementing a one-per-child caching module for other applications (XML::LibXML comes to mind), similar to how Apache::DBI overloads DBI::connect(). I can't seem to derive an understanding of how Apache::DBI does what it does from its source. Is it a property of DBI itself? Would

Re: modifying request content

2004-04-07 Thread dorian
> > i'm actually really early on in this project, and could switch over to > > apache/mod_perl 2 without much fuss and use an input filter. > > That would probably be best if it truly has to be transparent and you > need to modify content and not just args. yes, as long as i can trap the entire r

Re: modifying request content

2004-04-07 Thread dorian
On Wed, Apr 07, 2004 at 05:08:51PM +0200, Tom Schindl wrote: > As far as I know not but you could pass information using $r->pnotes(), > maybe you could also use > > my $apr = Apache::Request->instance($r); > > In all modules in the chain and use $apr->param() to set/reset different > things.

modifying request content

2004-04-06 Thread dorian
is there any way currently to take the content of a request (say, from a POST or PUT), modify it an arbitrary way, then somehow put it back into the request object to make it available to handlers further down the chain? thanks in advance .dorian -- Report problems: http://perl.apache.org/bugs

Re: [mp2] ap_.*?_provider api

2004-02-04 Thread dorian
disregard that, i just looked again and i suppose that would be way too arbitrary to map out properly. .d -- Reporting bugs: 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] ap_.*?_provider api

2004-02-04 Thread dorian
is there currently any way (or plan) to register/use providers in mod_perl 2? a quick grep through the source would suggest not, but perhaps i'm missing something less obvious? cheers .dorian -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/mai